Filtering-based image coding device and method

ABSTRACT

According to embodiments of the present document, information for carrying out in-loop filtering across virtual boundaries can be efficiently signaled. For example, in-loop filtering can be carried out on the basis of signaling of information which is related to whether in-loop filtering across virtual boundaries is enabled or not.

BACKGROUND OF THE DISCLOSURE Field of the Disclosure

The present document relates to a filtering-based image coding apparatusand method.

Related Art

Recently, demand for high-resolution, high-quality image/video such as4K or 8K or higher ultra high definition (UHD) image/video has increasedin various fields. As image/video data has high resolution and highquality, the amount of information or bits to be transmitted increasesrelative to the existing image/video data, and thus, transmitting imagedata using a medium such as an existing wired/wireless broadband line oran existing storage medium or storing image/video data using existingstorage medium increase transmission cost and storage cost.

In addition, interest and demand for immersive media such as virtualreality (VR) and artificial reality (AR) content or holograms hasrecently increased and broadcasting for image/video is havingcharacteristics different from reality images such as game images hasincreased.

Accordingly, a highly efficient image/video compression technology isrequired to effectively compress, transmit, store, and reproduceinformation of a high-resolution, high-quality image/video havingvarious characteristics as described above.

Specifically, an in-loop filtering process is performed to increasesubjective/objective visual quality, and there is discussion on a schemefor increasing signaling efficiency of information for performingin-loop filtering based on virtual boundaries.

SUMMARY

According to an embodiment of the present document, a method and anapparatus for increasing image coding efficiency are provided.

According to an embodiment of the present document, efficient filteringapplication method and apparatus are provided.

According to an embodiment of the present document, a method andapparatus for effectively applying deblocking, sample adaptive offset(SAO), and adaptive loop filtering (ALF) are provided.

According to an embodiment of the present document, in-loop filteringmay be performed based on virtual boundaries.

According to an embodiment of the present document, a sequence parameterset (SPS) may include an SPS virtual boundaries enabled flag indicatingwhether in-loop filtering is performed across virtual boundaries.

According to an embodiment of the present document, in-loop filteringmay be performed across the virtual boundaries, based on the SPS virtualboundaries enabled flag.

According to an embodiment of the present document, an encodingapparatus for performing video/image encoding is provided.

According to one embodiment of the present document, there is provided acomputer-readable digital storage medium in which encoded video/imageinformation, generated according to the video/image encoding methoddisclosed in at least one of the embodiments of the present document, isstored.

According to an embodiment of the present document, there is provided acomputer-readable digital storage medium in which encoded information orencoded video/image information, causing to perform the video/imagedecoding method disclosed in at least one of the embodiments of thepresent document by the decoding apparatus, is stored.

According to an embodiment of the present document, overall image/videocompression efficiency may be improved.

According to an embodiment of the present document, subjective/objectivevisual quality may be improved through efficient filtering.

An in-loop filtering process based on virtual boundaries according to anembodiment of present document may save a hardware resource.

According to an embodiment of the present document, the in-loopfiltering process based on the virtual boundaries may be effectivelyperformed, and filtering performance may be improved.

According to an embodiment of the present document, information forin-loop filtering based on the virtual boundaries may be effectivelysignaled.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 schematically shows an example of a video/image coding system towhich embodiments of the present disclosure may be applied.

FIG. 2 is a view schematically illustrating the configuration of avideo/image encoding apparatus to which embodiments of the presentdisclosure may be applied.

FIG. 3 is a view schematically illustrating the configuration of avideo/image decoding apparatus to which embodiments of the presentdisclosure may be applied.

FIG. 4 exemplarily shows a hierarchical architecture for a codedvideo/image.

FIG. 5 is a flowchart illustrating an encoding method based on filteringin an encoding apparatus.

FIG. 6 is a flowchart illustrating a decoding method based on filteringin a decoding apparatus.

FIG. 7 and FIG. 8 schematically show an example of a video/imageencoding method and related components according to embodiment(s) of thepresent document.

FIG. 9 and FIG. 10 schematically show an example of an image/videodecoding method and related components according to an embodiment(s) ofthe present document.

FIG. 11 shows an example of a content streaming system to whichembodiment(s) disclosed in the present document may be applied.

DESCRIPTION OF EXEMPLARY EMBODIMENTS

The present disclosure may be modified in various forms, and specificembodiments thereof will be described and illustrated in the drawings.However, the embodiments are not intended for limiting the disclosure.The terms used in the following description are used to merely describespecific embodiments, but are not intended to limit the disclosure. Anexpression of a singular number includes an expression of the pluralnumber, so long as it is clearly read differently. The terms such as“include” and “have” are intended to indicate that features, numbers,steps, operations, elements, components, or combinations thereof used inthe following description exist and it should be thus understood thatthe possibility of existence or addition of one or more differentfeatures, numbers, steps, operations, elements, components, orcombinations thereof is not excluded.

In addition, each configuration of the drawings described in thisdocument is an independent illustration for explaining functions asfeatures that are different from each other, and does not mean that eachconfiguration is implemented by mutually different hardware or differentsoftware. For example, two or more of the configurations can be combinedto form one configuration, and one configuration can also be dividedinto multiple configurations. Without departing from the gist of thisdocument, embodiments in which configurations are combined and/orseparated are included in the scope of claims.

Hereinafter, examples of the present embodiment will be described indetail with reference to the accompanying drawings. In addition, likereference numerals are used to indicate like elements throughout thedrawings, and the same descriptions on the like elements will beomitted.

This document relates to video/image coding. For example,methods/embodiments disclosed in this document may be related to theversatile video coding (VVC) standard (ITU-T Rec. H.266), thenext-generation video/image coding standard after VVC, or other videocoding related standards (e.g., high efficiency video coding (HEVC)standard (ITU-T Rec. H.265), essential video coding (EVC) standard, AVS2standard, and the like).

This document suggests various embodiments of video/image coding, andthe above embodiments may also be performed in combination with eachother unless otherwise specified.

In this document, a video may refer to a series of images over time. Apicture generally refers to the unit representing one image at aparticular time frame, and a slice/tile refers to the unit constitutinga part of the picture in terms of coding. A slice/tile may include oneor more coding tree units (CTUs). One picture may consist of one or moreslices/tiles. One picture may consist of one or more tile groups. Onetile group may include one or more tiles.

A pixel or a pel may mean a smallest unit constituting one picture (orimage). Also, ‘sample’ may be used as a term corresponding to a pixel. Asample may generally represent a pixel or a value of a pixel, and mayrepresent only a pixel/pixel value of a luma component or only apixel/pixel value of a chroma component.

A unit may represent a basic unit of image processing. The unit mayinclude at least one of a specific region of the picture and informationrelated to the region. One unit may include one luma block and twochroma (ex. cb, cr) blocks. The unit may be used interchangeably withterms such as block or area in some cases. In a general case, an M×Nblock may include samples (or sample arrays) or a set (or array) oftransform coefficients of M columns and N rows. Alternatively, thesample may mean a pixel value in the spatial domain, and when such apixel value is transformed to the frequency domain, it may mean atransform coefficient in the frequency domain.

In this document, the term “/” and “,” should be interpreted to indicate“and/or.” For instance, the expression “A/B” may mean “A and/or B.”Further, “A, B” may mean “A and/or B.” Further, “A/B/C” may mean “atleast one of A, B, and/or C.” Also, “A/B/C” may mean “at least one of A,B, and/or C.”

Further, in the document, the term “or” should be interpreted toindicate “and/or.” For instance, the expression “A or B” may comprise 1)only A, 2) only B, and/or 3) both A and B. In other words, the term “or”in this document should be interpreted to indicate “additionally oralternatively.”

In the present specification, “at least one of A and B” may mean “onlyA”, “only B”, or “both A and B”. Further, in the present specification,the expression “at least one of A or B” or “at least one of A and/or B”may be interpreted the same as “at least one of A and B”.

Further, in the present specification, “at least one of A, B and C” maymean “only A”, “only B”, “only C”, or “any combination of A, B and C”.Further, “at least one of A, B or C” or “at least one of A, B and/or C”may mean “at least one of A, B and C”.

Further, the parentheses used in the present specification may mean “forexample”. Specifically, in the case that “prediction (intra prediction)”is expressed, it may be indicated that “intra prediction” is proposed asan example of “prediction”. In other words, the term “prediction” in thepresent specification is not limited to “intra prediction”, and it maybe indicated that “intra prediction” is proposed as an example of“prediction”. Further, even in the case that “prediction (i.e., intraprediction)” is expressed, it may be indicated that “intra prediction”is proposed as an example of “prediction”.

In the present specification, technical features individually explainedin one drawing may be individually implemented, or may be simultaneouslyimplemented.

FIG. 1 illustrates an example of a video/image coding system to whichthe disclosure of the present document may be applied.

Referring to FIG. 1 , a video/image coding system may include a sourcedevice and a reception device. The source device may transmit encodedvideo/image information or data to the reception device through adigital storage medium or network in the form of a file or streaming.

The source device may include a video source, an encoding apparatus, anda transmitter. The receiving device may include a receiver, a decodingapparatus, and a renderer. The encoding apparatus may be called avideo/image encoding apparatus, and the decoding apparatus may be calleda video/image decoding apparatus. The transmitter may be included in theencoding apparatus. The receiver may be included in the decodingapparatus. The renderer may include a display, and the display may beconfigured as a separate device or an external component.

The video source may acquire video/image through a process of capturing,synthesizing, or generating the video/image. The video source mayinclude a video/image capture device and/or a video/image generatingdevice. The video/image capture device may include, for example, one ormore cameras, video/image archives including previously capturedvideo/images, and the like. The video/image generating device mayinclude, for example, computers, tablets and smartphones, and may(electronically) generate video/images. For example, a virtualvideo/image may be generated through a computer or the like. In thiscase, the video/image capturing process may be replaced by a process ofgenerating related data.

The encoding apparatus may encode input video/image. The encodingapparatus may perform a series of processes such as prediction,transform, and quantization for compaction and coding efficiency. Theencoded data (encoded video/image information) may be output in the formof a bitstream.

The transmitter may transmit the encoded image/image information or dataoutput in the form of a bitstream to the receiver of the receivingdevice through a digital storage medium or a network in the form of afile or streaming. The digital storage medium may include variousstorage mediums such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, and thelike. The transmitter may include an element for generating a media filethrough a predetermined file format and may include an element fortransmission through a broadcast/communication network. The receiver mayreceive/extract the bitstream and transmit the received bitstream to thedecoding apparatus.

The decoding apparatus may decode the video/image by performing a seriesof processes such as dequantization, inverse transform, and predictioncorresponding to the operation of the encoding apparatus.

The renderer may render the decoded video/image. The renderedvideo/image may be displayed through the display.

FIG. 2 is a diagram schematically illustrating the configuration of avideo/image encoding apparatus to which the disclosure of the presentdocument may be applied. Hereinafter, what is referred to as the videoencoding apparatus may include an image encoding apparatus.

Referring to FIG. 2 , the encoding apparatus 200 may include and beconfigured with an image partitioner 210, a predictor 220, a residualprocessor 230, an entropy encoder 240, an adder 250, a filter 260, and amemory 270. The predictor 220 may include an inter predictor 221 and anintra predictor 222. The residual processor 230 may include atransformer 232, a quantizer 233, a dequantizer 234, and an inversetransformer 235. The residual processor 230 may further include asubtractor 231. The adder 250 may be called a reconstructor orreconstructed block generator. The image partitioner 210, the predictor220, the residual processor 230, the entropy encoder 240, the adder 250,and the filter 260, which have been described above, may be configuredby one or more hardware components (e.g., encoder chipsets orprocessors) according to an embodiment. In addition, the memory 270 mayinclude a decoded picture buffer (DPB), and may also be configured by adigital storage medium. The hardware component may further include thememory 270 as an internal/external component.

The image partitioner 210 may split an input image (or, picture, frame)input to the encoding apparatus 200 into one or more processing units.As an example, the processing unit may be called a coding unit (CU). Inthis case, the coding unit may be recursively split according to aQuad-tree binary-tree ternary-tree (QTBTTT) structure from a coding treeunit (CTU) or the largest coding unit (LCU). For example, one codingunit may be split into a plurality of coding units of a deeper depthbased on a quad-tree structure, a binary-tree structure, and/or aternary-tree structure. In this case, for example, the quad-treestructure is first applied and the binary-tree structure and/or theternary-tree structure may be later applied. Alternatively, thebinary-tree structure may also be first applied. A coding processaccording to the present disclosure may be performed based on a finalcoding unit which is not split any more. In this case, based on codingefficiency according to image characteristics or the like, the maximumcoding unit may be directly used as the final coding unit, or asnecessary, the coding unit may be recursively split into coding units ofa deeper depth, such that a coding unit having an optimal size may beused as the final coding unit. Here, the coding process may include aprocess such as prediction, transform, and reconstruction to bedescribed later. As another example, the processing unit may furtherinclude a prediction unit (PU) or a transform unit (TU). In this case,each of the prediction unit and the transform unit may be split orpartitioned from the aforementioned final coding unit. The predictionunit may be a unit of sample prediction, and the transform unit may be aunit for inducing a transform coefficient and/or a unit for inducing aresidual signal from the transform coefficient.

The unit may be interchangeably used with the term such as a block or anarea in some cases. Generally, an M×N block may represent samplescomposed of M columns and N rows or a group of transform coefficients.The sample may generally represent a pixel or a value of the pixel, andmay also represent only the pixel/pixel value of a luma component, andalso represent only the pixel/pixel value of a chroma component. Thesample may be used as the term corresponding to a pixel or a pelconfiguring one picture (or image).

The subtractor 231 may generate a residual signal (residual block,residual samples, or residual sample array) by subtracting a predictionsignal (predicted block, prediction samples, or prediction sample array)output from the predictor 220 from an input image signal (originalblock, original samples, or original sample array), and the generatedresidual signal is transmitted to the transformer 232. The predictor 220may perform prediction for a processing target block (hereinafter,referred to as a “current block”), and generate a predicted blockincluding prediction samples for the current block. The predictor 220may determine whether intra prediction or inter prediction is applied ona current block or in a CU unit. As described later in the descriptionof each prediction mode, the predictor may generate various kinds ofinformation related to prediction, such as prediction mode information,and transfer the generated information to the entropy encoder 240. Theinformation on the prediction may be encoded in the entropy encoder 240and output in the form of a bitstream.

The intra predictor 222 may predict a current block with reference tosamples within a current picture. The referenced samples may be locatedneighboring to the current block, or may also be located away from thecurrent block according to the prediction mode. The prediction modes inthe intra prediction may include a plurality of non-directional modesand a plurality of directional modes. The non-directional mode mayinclude, for example, a DC mode or a planar mode. The directional modemay include, for example, 33 directional prediction modes or 65directional prediction modes according to the fine degree of theprediction direction. However, this is illustrative and the directionalprediction modes which are more or less than the above number may beused according to the setting. The intra predictor 222 may alsodetermine the prediction mode applied to the current block using theprediction mode applied to the neighboring block.

The inter predictor 221 may induce a predicted block of the currentblock based on a reference block (reference sample array) specified by amotion vector on a reference picture. At this time, in order to decreasethe amount of motion information transmitted in the inter predictionmode, the motion information may be predicted in units of a block, asub-block, or a sample based on the correlation of the motioninformation between the neighboring block and the current block. Themotion information may include a motion vector and a reference pictureindex. The motion information may further include inter predictiondirection (L0 prediction, L1 prediction, Bi prediction, or the like)information. In the case of the inter prediction, the neighboring blockmay include a spatial neighboring block existing within the currentpicture and a temporal neighboring block existing in the referencepicture. The reference picture including the reference block and thereference picture including the temporal neighboring block may also bethe same as each other, and may also be different from each other. Thetemporal neighboring block may be called the name such as a collocatedreference block, a collocated CU (colCU), or the like, and the referencepicture including the temporal neighboring block may also be called acollocated picture (colPic). For example, the inter predictor 221 mayconfigure a motion information candidate list based on the neighboringblocks, and generate information indicating what candidate is used toderive the motion vector and/or the reference picture index of thecurrent block. The inter prediction may be performed based on variousprediction modes, and for example, in the case of a skip mode and amerge mode, the inter predictor 221 may use the motion information ofthe neighboring block as the motion information of the current block. Inthe case of the skip mode, the residual signal may not be transmittedunlike the merge mode. A motion vector prediction (MVP) mode mayindicate the motion vector of the current block by using the motionvector of the neighboring block as a motion vector predictor, andsignaling a motion vector difference.

The predictor 220 may generate a prediction signal based on variousprediction methods described below. For example, the predictor may notonly apply intra prediction or inter prediction to predict one block butalso simultaneously apply both intra prediction and inter prediction.This may be called combined inter and intra prediction (CIIP). Inaddition, the predictor may perform an intra block copy (IBC) forprediction of a block. The intra block copy may be used for contentimage/moving image coding of a game or the like, for example, screencontent coding (SCC). The IBC basically performs prediction in thecurrent picture, but may be performed similarly to inter prediction inthat a reference block is derived in the current picture. That is, theIBC may use at least one of inter prediction techniques described in thepresent document.

The prediction signal generated through the inter predictor 221 and/orthe intra predictor 222 may be used to generate a reconstructed signalor to generate a residual signal. The transformer 232 may generatetransform coefficients by applying a transform technique to the residualsignal. For example, the transform technique may include at least one ofa discrete cosine transform (DCT), a discrete sine transform (DST), agraph-based transform (GBT), or a conditionally non-linear transform(CNT). Here, the GBT means transform obtained from a graph whenrelationship information between pixels is represented by the graph. TheCNT refers to the transform obtained based on a prediction signalgenerated using all previously reconstructed pixels. In addition, thetransform process may be applied to square pixel blocks having the samesize, or may be applied to blocks having a variable size rather than asquare.

The quantizer 233 may quantize the transform coefficients and transmitthem to the entropy encoder 240, and the entropy encoder 240 may encodethe quantized signal (information on the quantized transformcoefficients) and output a bitstream. The information on the quantizedtransform coefficients may be referred to as residual information. Thequantizer 233 may rearrange block type quantized transform coefficientsinto a one-dimensional vector form based on a coefficient scanningorder, and generate information on the quantized transform coefficientsbased on the quantized transform coefficients in the one-dimensionalvector form. The entropy encoder 240 may perform various encodingmethods such as, for example, exponential Golomb, context-adaptivevariable length coding (CAVLC), context-adaptive binary arithmeticcoding (CABAC), and the like. The entropy encoder 240 may encodeinformation necessary for video/image reconstruction together with orseparately from the quantized transform coefficients (e.g., values ofsyntax elements and the like). Encoded information (e.g., encodedvideo/image information) may be transmitted or stored in the unit of anetwork abstraction layer (NAL) in the form of a bitstream. Thevideo/image information may further include information on variousparameter sets, such as an adaptation parameter set (APS), a pictureparameter set (PPS), a sequence parameter set (SPS), or a videoparameter set (VPS). In addition, the video/image information mayfurther include general constraint information. In the present document,information and/or syntax elements being signaled/transmitted to bedescribed later may be encoded through the above-described encodingprocess, and be included in the bitstream. The bitstream may betransmitted through a network, or may be stored in a digital storagemedium. Here, the network may include a broadcasting network and/or acommunication network, and the digital storage medium may includevarious storage media, such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, andthe like. A transmitter (not illustrated) transmitting a signal outputfrom the entropy encoder 240 and/or a storage unit (not illustrated)storing the signal may be configured as an internal/external element ofthe encoding apparatus 200, and alternatively, the transmitter may beincluded in the entropy encoder 240.

The quantized transform coefficients output from the quantizer 233 maybe used to generate a prediction signal. For example, the residualsignal (residual block or residual samples) may be reconstructed byapplying dequantization and inverse transform to the quantized transformcoefficients through the dequantizer 234 and the inverse transformer235. The adder 250 adds the reconstructed residual signal to theprediction signal output from the predictor 220 to generate areconstructed signal (reconstructed picture, reconstructed block,reconstructed samples, or reconstructed sample array). If there is noresidual for the processing target block, such as a case that a skipmode is applied, the predicted block may be used as the reconstructedblock. The generated reconstructed signal may be used for intraprediction of a next processing target block in the current picture, andmay be used for inter prediction of a next picture through filtering asdescribed below.

Meanwhile, luma mapping with chroma scaling (LMCS) may be applied duringa picture encoding and/or reconstruction process.

The filter 260 may improve subjective/objective image quality byapplying filtering to the reconstructed signal. For example, the filter260 may generate a modified reconstructed picture by applying variousfiltering methods to the reconstructed picture, and store the modifiedreconstructed picture in the memory 270, specifically, in a DPB of thememory 270. The various filtering methods may include, for example,deblocking filtering, a sample adaptive offset (SAO), an adaptive loopfilter, a bilateral filter, and the like. The filter 260 may generatevarious kinds of information related to the filtering, and transfer thegenerated information to the entropy encoder 290 as described later inthe description of each filtering method. The information related to thefiltering may be encoded by the entropy encoder 290 and output in theform of a bitstream.

The modified reconstructed picture transmitted to the memory 270 may beused as a reference picture in the inter predictor 221. When the interprediction is applied through the encoding apparatus, predictionmismatch between the encoding apparatus 200 and the decoding apparatuscan be avoided and encoding efficiency can be improved.

The DPB of the memory 270 may store the modified reconstructed picturefor use as the reference picture in the inter predictor 221. The memory270 may store motion information of a block from which the motioninformation in the current picture is derived (or encoded) and/or motioninformation of blocks in the picture, having already been reconstructed.The stored motion information may be transferred to the inter predictor221 to be utilized as motion information of the spatial neighboringblock or motion information of the temporal neighboring block. Thememory 270 may store reconstructed samples of reconstructed blocks inthe current picture, and may transfer the reconstructed samples to theintra predictor 222.

FIG. 3 is a diagram for schematically explaining the configuration of avideo/image decoding apparatus to which the disclosure of the presentdocument may be applied.

Referring to FIG. 3 , the decoding apparatus 300 may include andconfigured with an entropy decoder 310, a residual processor 320, apredictor 330, an adder 340, a filter 350, and a memory 360. Thepredictor 330 may include an inter predictor 331 and an intra predictor332. The residual processor 320 may include a dequantizer 321 and aninverse transformer 322. The entropy decoder 310, the residual processor320, the predictor 330, the adder 340, and the filter 350, which havebeen described above, may be configured by one or more hardwarecomponents (e.g., decoder chipsets or processors) according to anembodiment. Further, the memory 360 may include a decoded picture buffer(DPB), and may be configured by a digital storage medium. The hardwarecomponent may further include the memory 360 as an internal/externalcomponent.

When the bitstream including the video/image information is input, thedecoding apparatus 300 may reconstruct the image in response to aprocess in which the video/image information is processed in theencoding apparatus illustrated in FIG. 2 . For example, the decodingapparatus 300 may derive the units/blocks based on block split-relatedinformation acquired from the bitstream. The decoding apparatus 300 mayperform decoding using the processing unit applied to the encodingapparatus. Therefore, the processing unit for the decoding may be, forexample, a coding unit, and the coding unit may be split according tothe quad-tree structure, the binary-tree structure, and/or theternary-tree structure from the coding tree unit or the maximum codingunit. One or more transform units may be derived from the coding unit.In addition, the reconstructed image signal decoded and output throughthe decoding apparatus 300 may be reproduced through a reproducingapparatus.

The decoding apparatus 300 may receive a signal output from the encodingapparatus of FIG. 2 in the form of a bitstream, and the received signalmay be decoded through the entropy decoder 310. For example, the entropydecoder 310 may parse the bitstream to derive information (e.g.,video/image information) necessary for image reconstruction (or picturereconstruction). The video/image information may further includeinformation on various parameter sets such as an adaptation parameterset (APS), a picture parameter set (PPS), a sequence parameter set(SPS), or a video parameter set (VPS). In addition, the video/imageinformation may further include general constraint information. Thedecoding apparatus may further decode picture based on the informationon the parameter set and/or the general constraint information.Signaled/received information and/or syntax elements described later inthis document may be decoded may decode the decoding process andobtained from the bitstream. For example, the entropy decoder 310decodes the information in the bitstream based on a coding method suchas exponential Golomb coding, CAVLC, or CABAC, and output syntaxelements required for image reconstruction and quantized values oftransform coefficients for residual. More specifically, the CABACentropy decoding method may receive a bin corresponding to each syntaxelement in the bitstream, determine a context model by using a decodingtarget syntax element information, decoding information of a decodingtarget block or information of a symbol/bin decoded in a previous stage,and perform an arithmetic decoding on the bin by predicting aprobability of occurrence of a bin according to the determined contextmodel, and generate a symbol corresponding to the value of each syntaxelement. In this case, the CABAC entropy decoding method may update thecontext model by using the information of the decoded symbol/bin for acontext model of a next symbol/bin after determining the context model.The information related to the prediction among the information decodedby the entropy decoder 310 may be provided to the predictor 330, andinformation on the residual on which the entropy decoding has beenperformed in the entropy decoder 310, that is, the quantized transformcoefficients and related parameter information, may be input to thedequantizer 321. In addition, information on filtering among informationdecoded by the entropy decoder 310 may be provided to the filter 350.Meanwhile, a receiver (not illustrated) for receiving a signal outputfrom the encoding apparatus may be further configured as aninternal/external element of the decoding apparatus 300, or the receivermay be a constituent element of the entropy decoder 310. Meanwhile, thedecoding apparatus according to the present document may be referred toas a video/image/picture decoding apparatus, and the decoding apparatusmay be classified into an information decoder (video/image/pictureinformation decoder) and a sample decoder (video/image/picture sampledecoder). The information decoder may include the entropy decoder 310,and the sample decoder may include at least one of the dequantizer 321,the inverse transformer 322, the predictor 330, the adder 340, thefilter 350, and the memory 360.

The dequantizer 321 may dequantize the quantized transform coefficientsto output the transform coefficients. The dequantizer 321 may rearrangethe quantized transform coefficients in a two-dimensional block form. Inthis case, the rearrangement may be performed based on a coefficientscan order performed by the encoding apparatus. The dequantizer 321 mayperform dequantization for the quantized transform coefficients using aquantization parameter (e.g., quantization step size information), andacquire the transform coefficients.

The inverse transformer 322 inversely transforms the transformcoefficients to acquire the residual signal (residual block, residualsample array).

The predictor 330 may perform the prediction of the current block, andgenerate a predicted block including the prediction samples of thecurrent block. The predictor may determine whether the intra predictionis applied or the inter prediction is applied to the current block basedon the information about prediction output from the entropy decoder 310,and determine a specific intra/inter prediction mode.

The predictor may generate a prediction signal based on variousprediction methods described below. For example, the predictor may notonly apply intra prediction or inter prediction to predict one block butalso simultaneously apply intra prediction and inter prediction. Thismay be called combined inter and intra prediction (CIIP). In addition,the predictor may perform an intra block copy (IBC) for prediction of ablock. The intra block copy may be used for content image/moving imagecoding of a game or the like, for example, screen content coding (SCC).The IBC basically performs prediction in the current picture, but may beperformed similarly to inter prediction in that a reference block isderived in the current picture. That is, the IBC may use at least one ofinter prediction techniques described in the present document.

The intra predictor 332 may predict the current block by referring tothe samples in the current picture. The referred samples may be locatedin the neighborhood of the current block, or may be located apart fromthe current block according to the prediction mode. In intra prediction,prediction modes may include a plurality of non-directional modes and aplurality of directional modes. The intra predictor 332 may determinethe prediction mode to be applied to the current block by using theprediction mode applied to the neighboring block.

The inter predictor 331 may derive a predicted block for the currentblock based on a reference block (reference sample array) specified by amotion vector on a reference picture. In this case, in order to reducethe amount of motion information being transmitted in the interprediction mode, motion information may be predicted in the unit ofblocks, subblocks, or samples based on correlation of motion informationbetween the neighboring block and the current block. The motioninformation may include a motion vector and a reference picture index.The motion information may further include information on interprediction direction (L0 prediction, L1 prediction, Bi prediction, andthe like). In case of inter prediction, the neighboring block mayinclude a spatial neighboring block existing in the current picture anda temporal neighboring block existing in the reference picture. Forexample, the inter predictor 331 may construct a motion informationcandidate list based on neighboring blocks, and derive a motion vectorof the current block and/or a reference picture index based on thereceived candidate selection information. Inter prediction may beperformed based on various prediction modes, and the information on theprediction may include information indicating a mode of inter predictionfor the current block.

The adder 340 may generate a reconstructed signal (reconstructedpicture, reconstructed block, or reconstructed sample array) by addingthe obtained residual signal to the prediction signal (predicted blockor predicted sample array) output from the predictor 330. If there is noresidual for the processing target block, such as a case that a skipmode is applied, the predicted block may be used as the reconstructedblock.

The adder 340 may be called a reconstructor or a reconstructed blockgenerator. The generated reconstructed signal may be used for the intraprediction of a next block to be processed in the current picture, andas described later, may also be output through filtering or may also beused for the inter prediction of a next picture.

Meanwhile, a luma mapping with chroma scaling (LMCS) may also be appliedin the picture decoding process.

The filter 350 may improve subjective/objective image quality byapplying filtering to the reconstructed signal. For example, the filter350 may generate a modified reconstructed picture by applying variousfiltering methods to the reconstructed picture, and store the modifiedreconstructed picture in the memory 360, specifically, in a DPB of thememory 360. The various filtering methods may include, for example,deblocking filtering, a sample adaptive offset, an adaptive loop filter,a bilateral filter, and the like.

The (modified) reconstructed picture stored in the DPB of the memory 360may be used as a reference picture in the inter predictor 331. Thememory 360 may store the motion information of the block from which themotion information in the current picture is derived (or decoded) and/orthe motion information of the blocks in the picture having already beenreconstructed. The stored motion information may be transferred to theinter predictor 331 so as to be utilized as the motion information ofthe spatial neighboring block or the motion information of the temporalneighboring block. The memory 360 may store reconstructed samples ofreconstructed blocks in the current picture, and transfer thereconstructed samples to the intra predictor 332.

In the present specification, the embodiments described in the predictor330, the dequantizer 321, the inverse transformer 322, and the filter350 of the decoding apparatus 300 may also be applied in the same manneror corresponding to the predictor 220, the dequantizer 234, the inversetransformer 235, and the filter 260 of the encoding apparatus 200.

Meanwhile, as described above, in performing video coding, prediction isperformed to improve compression efficiency. Through this, a predictedblock including prediction samples for a current block as a block to becoded (i.e., a coding target block) may be generated. Here, thepredicted block includes prediction samples in a spatial domain (orpixel domain). The predicted block is derived in the same manner in anencoding apparatus and a decoding apparatus, and the encoding apparatusmay signal information (residual information) on residual between theoriginal block and the predicted block, rather than an original samplevalue of an original block, to the decoding apparatus, therebyincreasing image coding efficiency. The decoding apparatus may derive aresidual block including residual samples based on the residualinformation, add the residual block and the predicted block to generatereconstructed blocks including reconstructed samples, and generate areconstructed picture including the reconstructed blocks.

The residual information may be generated through a transform andquantization process. For example, the encoding apparatus may derive aresidual block between the original block and the predicted block,perform a transform process on residual samples (residual sample array)included in the residual block to derive transform coefficients, performa quantization process on the transform coefficients to derive quantizedtransform coefficients, and signal related residual information to thedecoding apparatus (through a bit stream). Here, the residualinformation may include value information of the quantized transformcoefficients, location information, a transform technique, a transformkernel, a quantization parameter, and the like. The decoding apparatusmay perform dequantization/inverse transform process based on theresidual information and derive residual samples (or residual blocks).The decoding apparatus may generate a reconstructed picture based on thepredicted block and the residual block. Also, for reference for interprediction of a picture afterward, the encoding apparatus may alsodequantize/inverse-transform the quantized transform coefficients toderive a residual block and generate a reconstructed picture basedthereon.

In this document, at least one of quantization/dequantization and/ortransform/inverse transform may be omitted. When thequantization/dequantization is omitted, the quantized transformcoefficient may be referred to as a transform coefficient. When thetransform/inverse transform is omitted, the transform coefficient may becalled a coefficient or a residual coefficient or may still be calledthe transform coefficient for uniformity of expression.

In this document, the quantized transform coefficient and the transformcoefficient may be referred to as a transform coefficient and a scaledtransform coefficient, respectively. In this case, the residualinformation may include information on transform coefficient(s), and theinformation on the transform coefficient(s) may be signaled throughresidual coding syntax. Transform coefficients may be derived based onthe residual information (or information on the transformcoefficient(s)), and scaled transform coefficients may be derivedthrough inverse transform (scaling) on the transform coefficients.Residual samples may be derived based on inverse transform (transform)of the scaled transform coefficients. This may be applied/expressed inother parts of this document as well.

The predictor of the encoding apparatus/decoding apparatus may deriveprediction samples by performing inter prediction in units of blocks.Inter prediction can be a prediction derived in a manner that isdependent on data elements (e.g. sample values or motion information,etc) of picture(s) other than the current picture. When the interprediction is applied to the current block, based on the reference block(reference sample arrays) specified by the motion vector on thereference picture pointed to by the reference picture index, thepredicted block (prediction sample arrays) for the current block can bederived. In this case, in order to reduce the amount of motioninformation transmitted in the inter prediction mode, the motioninformation of the current block may be predicted in units of blocks,subblocks, or samples based on the correlation between the motioninformation between neighboring blocks and the current block. The motioninformation may include the motion vector and the reference pictureindex. The motion information may further include inter prediction type(L0 prediction, L1 prediction, Bi prediction, etc.) information. Whenthe inter prediction is applied, the neighboring blocks may include aspatial neighboring block existing in the current picture and a temporalneighboring block existing in the reference picture. The referencepicture including the reference block and the reference pictureincluding the temporal neighboring block may be the same or different.The temporal neighboring block may be called a collocated referenceblock, a collocated CU (colCU), etc., and a reference picture includingthe temporally neighboring block may be called a collocated picture(colPic). For example, a motion information candidate list may beconstructed based on neighboring blocks of the current block, and a flagor index information indicating which candidate is selected (used) toderive the motion vector and/or the reference picture index of thecurrent block may be signaled. The inter prediction may be performedbased on various prediction modes. For example, in the skip mode and themerge mode, the motion information of the current block may be the sameas the motion information of a selected neighboring block. In the skipmode, unlike the merge mode, a residual signal may not be transmitted.In the case of a motion vector prediction (MVP) mode, a motion vector ofa selected neighboring block may be used as a motion vector predictor,and a motion vector difference may be signaled. In this case, the motionvector of the current block may be derived using the sum of the motionvector predictor and the motion vector difference.

The motion information may include L0 motion information and/or L1motion information according to an inter prediction type (L0 prediction,L1 prediction, Bi prediction, etc.). A motion vector in the L0 directionmay be referred to as an L0 motion vector or MVL0, and a motion vectorin the L1 direction may be referred to as an L1 motion vector or MVL1.The prediction based on the L0 motion vector may be called L0prediction, the prediction based on the L1 motion vector may be calledthe L1 prediction, and the prediction based on both the L0 motion vectorand the L1 motion vector may be called a bi-prediction. Here, the L0motion vector may indicate a motion vector associated with the referencepicture list L0 (L0), and the L1 motion vector may indicate a motionvector associated with the reference picture list L1 (L1). The referencepicture list L0 may include pictures that are previous than the currentpicture in output order as reference pictures, and the reference picturelist L1 may include pictures that are subsequent than the currentpicture in output order. The previous pictures may be called forward(reference) pictures, and the subsequent pictures may be called backward(reference) pictures. The reference picture list L0 may further includepictures that are subsequent than the current picture in output order asreference pictures. In this case, the previous pictures may be indexedfirst, and the subsequent pictures may be indexed next in the referencepicture list L0. The reference picture list L1 may further includepictures previous than the current picture in output order as referencepictures. In this case, the subsequent pictures may be indexed first inthe reference picture list 1 and the previous pictures may be indexednext. Here, the output order may correspond to a picture order count(POC) order.

FIG. 4 exemplarily shows a hierarchical structure for a codedimage/video.

Referring to FIG. 4 , the coded image/video is divided into VCL (videocoding layer) that deals with an image/video decoding process anditself, a subsystem that transmits and stores the coded information, anda network abstraction layer (NAL) that exists between the VCL andsubsystems and is responsible for network adaptation functions.

The VCL may generate VCL data including compressed image data (slicedata), or generate parameter sets including a picture parameter set(Picture Parameter Set: PPS), a sequence parameter set (SequenceParameter Set: SPS), a video parameter set (Video Parameter Set: VPS)etc. or a supplemental enhancement information (SEI) messageadditionally necessary for the decoding process of an image.

In the NAL, a NAL unit may be generated by adding header information(NAL unit header) to a raw byte sequence payload (RBSP) generated in theVCL. In this case, the RBSP refers to slice data, parameter sets, SEImessages, etc. generated in the VCL. The NAL unit header may include NALunit type information specified according to RBSP data included in thecorresponding NAL unit.

As shown in the figure, the NAL unit may be divided into a VCL NAL unitand a Non-VCL NAL unit according to the RBSP generated in the VCL. TheVCL NAL unit may mean a NAL unit including information (sliced data)about an image, and the Non-VCL NAL unit may mean a NAL unit containinginformation (parameter set or SEI message) necessary for decoding animage.

The above-described VCL NAL unit and Non-VCL NAL unit may be transmittedthrough a network by attaching header information according to a datastandard of the subsystem. For example, the NAL unit may be transformedinto a data form of a predetermined standard such as H.266/VVC fileformat, Real-time Transport Protocol (RTP), Transport Stream (TS), etc.and transmitted through various networks.

As described above, in the NAL unit, the NAL unit type may be specifiedaccording to the RBSP data structure included in the corresponding NALunit, and information on this NAL unit type may be stored and signaledin the NAL unit header.

For example, the NAL unit may be roughly classified into the VCL NALunit type and the Non-VCL NAL unit type depending on whether the NALunit includes information about the image (slice data). The VCL NAL unittype may be classified according to property and a type of a pictureincluded in the VCL NAL unit, and the Non-VCL NAL unit type may beclassified according to the type of a parameter set.

The following is an example of the NAL unit type specified according tothe type of parameter set included in the Non-VCL NAL unit type.

-   -   APS (Adaptation Parameter Set) NAL unit: Type for NAL unit        including APS    -   DPS (Decoding Parameter Set) NAL unit: Type for NAL unit        including DPS    -   VPS (Video Parameter Set) NAL unit: Type for NAL unit including        VPS    -   SPS (Sequence Parameter Set) NAL unit: Type for NAL unit        including SPS    -   PPS (Picture Parameter Set) NAL unit: Type for NAL unit        including PPS    -   PH (Picture header) NAL unit: Type for NAL unit including PH

The above-described NAL unit types have syntax information for the NALunit type, and the syntax information may be stored and signaled in theNAL unit header. For example, the syntax information may benal_unit_type, and NAL unit types may be specified by a nal_unit_typevalue.

Meanwhile, as described above, one picture may include a plurality ofslices, and one slice may include a slice header and slice data. In thiscase, one picture header may be further added to a plurality of slices(a slice header and a slice data set) in one picture. The picture header(picture header syntax) may include information/parameters commonlyapplicable to the picture. In this document, a slice may be mixed orreplaced with a tile group. Also, in this document, a slice header maybe mixed or replaced with a type group header.

The slice header (slice header syntax or slice header information) mayinclude information/parameters commonly applicable to the slice. The APS(APS syntax) or PPS (PPS syntax) may include information/parameterscommonly applicable to one or more slices or pictures. The SPS (SPSsyntax) may include information/parameters commonly applicable to one ormore sequences. The VPS (VPS syntax) may include information/parameterscommonly applicable to multiple layers. The DPS (DPS syntax) may includeinformation/parameters commonly applicable to the entire video. The DPSmay include information/parameters related to concatenation of a codedvideo sequence (CVS). In this document, high level syntax (HLS) mayinclude at least one of the APS syntax, PPS syntax, SPS syntax, VPSsyntax, DPS syntax, picture header syntax, and slice header syntax.

In this document, the image/video information encoded in the encodingapparatus and signaled in the form of a bitstream to the decodingapparatus may include, as well as picture partitioning-relatedinformation in the picture, intra/inter prediction information, residualinformation, in-loop filtering information, etc. the informationincluded in the slice header, the information included in the pictureheader, the information included in the APS, the information included inthe PPS, the information included in the SPS, the information includedin the VPS, and/or the information included in the DPS. In addition, theimage/video information may further include information of the NAL unitheader.

Meanwhile, in order to compensate for a difference between an originalimage and a reconstructed image due to an error occurring in acompression encoding process such as quantization, an in-loop filteringprocess may be performed on reconstructed samples or reconstructedpictures as described above. As described above, the in-loop filteringmay be performed by the filter of the encoding apparatus and the filterof the decoding apparatus, and a deblocking filter, SAO, and/or adaptiveloop filter (ALF) may be applied. For example, the ALF process may beperformed after the deblocking filtering process and/or the SAO processare completed. However, even in this case, the deblocking filteringprocess and/or the SAO process may be omitted.

Hereinafter, picture reconstruction and filtering will be described indetail. In image/video coding, a reconstructed block may be generatedbased on intra prediction/inter prediction in each block unit, and areconstructed picture including the reconstructed blocks may begenerated. When the current picture/slice is an I picture/slice, blocksincluded in the current picture/slice may be reconstructed based on onlyintra prediction. Meanwhile, when the current picture/slice is a P or Bpicture/slice, blocks included in the current picture/slice may bereconstructed based on intra prediction or inter prediction. In thiscase, intra prediction may be applied to some blocks in the currentpicture/slice, and inter prediction may be applied to the remainingblocks.

The intra prediction may represent a prediction for generatingprediction samples for the current block based on reference samples inthe picture (hereinafter, current picture) to which the current blockbelongs. In case that the intra prediction is applied to the currentblock, neighboring reference samples to be used for the intra predictionof the current block may be derived. The neighboring reference samplesof the current block may include a sample adjacent to a left boundary ofthe current block having a size of nW×nH, total 2×nH samples neighboringthe bottom-left, a sample adjacent to the top boundary of the currentblock, total 2×nW samples neighboring the top-right, and one sampleneighboring the top-left of the current block. Alternatively, theneighboring reference samples of the current block may include topneighboring sample of plural columns and left neighboring sample ofplural rows. Alternatively, the neighboring reference samples of thecurrent block may include total nH samples adjacent to the rightboundary of the current block having a size of nW×nH, total nH samplesadjacent to the right boundary of the current block, total nW samplesadjacent to the bottom boundary of the current block, and one sampleneighboring the bottom-right of the current block.

However, some of the neighboring reference samples of the current blockmay have not yet been decoded or may not be available. In this case, thedecoder may configure the neighboring reference samples to be used forthe prediction through substitution of available samples for theunavailable samples. Alternatively, the neighboring reference samples tobe used for the prediction may be configured through interpolation ofthe available samples.

When neighboring reference samples are derived, there are two cases,that is, a case (i) in which a prediction sample may be derived based onan average or interpolation of neighboring reference samples of acurrent block, and a case (ii) in which the prediction sample may bederived based on a reference sample present in a specific (prediction)direction for the prediction sample among the neighboring referencesamples of the current block. The case (i) may be called anon-directional mode or a non-angular mode, and the case (ii) may becalled a directional mode or an angular mode. In addition, theprediction sample may also be generated through a first neighboringsample and a second neighboring sample located in a direction oppositeto the prediction direction of the intra prediction mode of the currentblock based on the prediction sample of the current block among theneighboring reference samples. The above case may be referred to aslinear interpolation intra prediction (LIP). In addition, chromaprediction samples may be generated based on luma samples by using alinear model. This case may be called an LM mode. In addition, atemporary prediction sample of the current block may be derived based onfiltered neighboring reference samples. At least one reference sample,which is derived according to the intra prediction mode among theexisting neighboring reference samples, that is, unfiltered neighboringreference samples, and the temporary prediction sample may beweighted-summed to derive the prediction sample of the current block.The above case may be called a position dependent intra prediction(PDPC). In addition, a reference sample line having the highestprediction accuracy among the neighboring multiple reference samplelines of the current block may be selected to derive the predictionsample by using the reference sample located in the prediction directionon the corresponding line, and the reference sample line used herein maybe indicated (signaled) to a decoding apparatus, thereby performingintra-prediction encoding. The above case may be called multi-referenceline (MRL) intra prediction or MRL-based intra prediction. In addition,intra prediction may be performed based on the same intra predictionmode by dividing the current block into vertical or horizontalsub-partitions, and neighboring reference samples may be derived andused in units of the sub-partitions. That is, in this case, the intraprediction mode for the current block is equally applied to thesub-partitions, and the intra prediction performance may be improved insome cases by deriving and using the neighboring reference samples inunits of the sub-partitions. Such a prediction method may be calledintra sub-partitions (ISP) or ISP-based intra prediction. Theaforementioned intra prediction methods may be called an intraprediction type distinct to the intra prediction mode in the sections1.2. The intra prediction type may be called in various terms such as anintra prediction technique or an additional intra prediction mode or thelike. For example, the intra prediction type (or additional intraprediction mode or the like) may include at least one of theaforementioned LIP, PDPC, MRL, and ISP. A general intra predictionmethod except for the specific intra prediction type such as LIP, PDPC,MRL, or ISP may be called a normal intra prediction type. The normalintra prediction type may be generally applied when the specific intraprediction type is not applied, and prediction may be performed based onthe aforementioned intra prediction mode. Meanwhile, optionally,post-processing filtering may be performed on the derived predictionsample.

Specifically, the intra prediction process may include an operation ofdetermining an intra prediction mode/type, an operation of deriving aneighboring reference sample, and an operation of deriving a predictionsample based on the intra prediction mode/type. In addition, optionally,a post-processing filtering operation may be performed on the derivedprediction sample.

A modified reconstructed picture may be generated through the in-loopfiltering process, and the modified reconstructed picture may be outputas a decoded picture in the decoding apparatus and may also be stored ina decoded picture buffer or memory of the encoding apparatus/decodingapparatus and used as a reference picture in the inter predictionprocess when the picture is encoded/decoded at a later time. The in-loopfiltering process may include a deblocking filtering process, a sampleadaptive offset (SAO) process, and/or an adaptive loop filter (ALF)process as described above. In this case, one or some of the deblockingfiltering process, SAO process, ALF process, and bi-lateral filterprocess may be sequentially applied, or all of the processes may besequentially applied. For example, the SAO process may be performedafter the deblocking filtering process is applied to the reconstructedpicture. Alternatively, for example, the ALF process may be performedafter the deblocking filtering process is applied to the reconstructedpicture. This may also be equally performed in the encoding apparatus.

The deblocking filtering is a filtering technique which removesdistortion occurring at boundaries between blocks in the reconstructedpicture. The deblocking filtering process may, for example, derive atarget boundary in the reconstructed picture, determine a boundarystrength (bS) for the target boundary, and perform deblocking filteringon the target boundary, based on the bS. The bS may be determined basedon a prediction mode, a motion vector difference, whether referencepictures are identical, whether a non-zero significant coefficientexists, etc., of two blocks adjacent to the target boundary.

The SAO is a method in which an offset difference between thereconstructed picture and the original picture is compensated on asample basis. For example, the SAO may be applied based on a type suchas a band offset, an edge offset, or the like. According to the SAO,samples may be classified into different categories according to eachSAO type, and an offset value may be added to each sample, based on thecategory. Filtering information for the SAO may include information onwhether the SAO is applied, SAO type information, SAO offset valueinformation, or the like. The SAO may be applied to the reconstructedpicture after the deblocking filtering is applied.

The ALF is a technique for filtering the reconstructed picture on asample basis, based on filter coefficients according to a filter shape.The encoding apparatus may determine whether the ALF is applied, an ALFshape, and/or an ALF filtering coefficient or the like by comparing thereconstructed picture and the original picture, and may signal thedetermination result to the decoding apparatus. That is, the filteringinformation for the ALF may include information on whether the ALF isapplied, ALF filter shape information, ALF filtering coefficientinformation, or the like. The ALF may be applied to the reconstructedpicture after the deblocking filtering is applied.

FIG. 5 is a flowchart illustrating an encoding method based on filteringin an encoding apparatus. The method of FIG. 5 may include steps S500 toS530.

In the step S500, the encoding apparatus may generate a reconstructedpicture. The step S500 may be performed based on the aforementionedreconstructed picture (or reconstructed samples) generation process.

In the step S510, the encoding apparatus may determine whether in-loopfiltering is applied (across a virtual boundary) based on in-loopfiltering-related information. Herein, the in-loop filtering may includeat least one of the aforementioned de-blocking filtering, SAO, and ALF.

In the step S520, the encoding apparatus may generate a modifiedreconstructed picture (modified reconstructed samples) based on thedetermination of the step S510. Herein, the modified reconstructedpicture (modified reconstructed samples) may be a filtered reconstructedpicture (filtered reconstructed samples).

In the step S530, the encoding apparatus may encode image/videoinformation including the in-loop filtering-related information, basedon the in-loop filtering process.

FIG. 6 is a flowchart illustrating a decoding method based on filteringin a decoding apparatus. The method of FIG. 6 may include steps S600 toS630.

In the step S600, the decoding apparatus may obtain image/videoinformation including in-loop filtering-related information from abitstream. Herein, the bitstream may be based on encoded image/videoinformation transmitted from the encoding apparatus.

In the step S610, the decoding apparatus may generate a reconstructedpicture. The step S610 may be performed based on the aforementionedreconstructed picture (or reconstructed samples).

In the step S620, the decoding apparatus may determine whether in-loopfiltering is applied (across a virtual boundary) based on the in-loopfiltering-related information. Herein, the in-loop filtering may includeat least one of the aforementioned de-blocking filtering, SAO, and ALF.

In the step S630, the decoding apparatus may generate a modifiedreconstructed picture (modified reconstructed samples) based on thedetermination of the step S620. Herein, the modified reconstructedpicture (modified reconstructed samples) may be a filtered reconstructedpicture (filtered reconstructed samples).

As described above, the in-loop filtering process may be applied to thereconstructed picture. In this case, a virtual boundary may be definedto further improve subjective/objective visual quality of thereconstructed picture, and the in-loop filtering process may be appliedacross the virtual boundary. The virtual boundary may include, forexample, a discontinuous edge such as a 360-degree image, a VR image, abound, a Picture In Picture (PIP), or the like. For example, the virtualboundary may be present at a predetermined location, and a presenceand/or location thereof may be signaled. For example, the virtualboundary may be located at an upper fourth sample line of a CTU row(specifically, for example, above the upper fourth sample of the CTUrow). As another example, information on the present and/or location ofthe virtual boundary may be signaled through HLS. The HLS may includethe SPS, the PPS, the picture header, the slice header, or the like asdescribed above.

Hereinafter, a high-level syntax signaling and semantics will bedescribed according to embodiments of the present disclosure.

An embodiment of the present document may include a method ofcontrolling loop filters. The present method for controlling the loopfilters may be applied to a reconstructed picture. In-loop filters (loopfilters) may be used for decoding of encoded bitstreams. The loopfilters may include the aforementioned deblocking, SAO, and ALF. The SPSmay include flags related to each of the deblocking, SAO, and ALF. Theflags may indicate whether each of tools is available for the coding ofa coded layer video sequence (CLVS) or coded video sequence (CVS)referring to the SPS.

When the loop filters are available for the CVS, the applying of theloop filters may be controlled not to be across specific boundaries. Forexample, whether the loop filters are across sub-picture boundaries maybe controlled. In addition, whether the loop filters are across tileboundaries may be controlled. In addition thereto, whether the loopfilters are across virtual boundaries may be controlled. Herein, thevirtual boundaries may be defined on CTUs based on availability of aline buffer.

Regarding whether the in-loop filtering process is performed across thevirtual boundary, in-loop filtering-related information may include atleast one of an SPS virtual boundaries enabled flag (a virtualboundaries enabled flag in an SPS), an SPS virtual boundaries presentflag, a picture header virtual boundaries present flag, an SPS pictureheader virtual boundaries present flag, and information on a virtualboundaries position.

In embodiments included in the present document, the information on thevirtual boundaries position may include information on an x-coordinateof a vertical virtual boundary and/or information on a y-coordinate of ahorizontal virtual boundary. Specifically, the information on thevirtual boundaries position may include the information on thex-coordinate of the vertical virtual boundary and/or the information onthe y-axis of the horizontal virtual boundary in units of luma samples.In addition, the information on the virtual boundaries position mayinclude information on the number of pieces of information (syntaxelements) on the x-coordinate of the vertical virtual boundary which ispresent in the SPS. In addition, the information on the virtualboundaries position may include information on the number of pieces ofinformation (syntax elements) on the y-coordinate of the horizontalvirtual boundary which is present in the SPS. Alternatively, theinformation on the virtual boundaries position may include informationon the number of pieces of information (syntax elements) on thex-coordinate of the vertical virtual boundary which is present in apicture header. In addition, the information on the virtual boundariesposition may include information on the number of pieces of information(syntax elements) on the y-coordinate of the horizontal virtual boundarywhich is present in the picture header.

The following tables show an exemplary syntax and semantics of an SPSaccording to the present embodiment.

TABLE 1 Descriptor seq_parameter_set_rbsp( ) {  ... subpics_present_flag u(1)  if( subpics_present_flag ) {  sps_num_subpics_minus1 u(8)   for( i = 0; i <= sps_num_subpics_minus1;i++ ) {    subpic_ctu_top_left_x[ i ] u(v)    subpic_ctu_top_left_y[ i ]u(v)    subpic_width_minus1[ i ] u(v)    subpic_height_minus1[ i ] u(v)   subpic_treated_as_pic_flag[ i ] u(1)   loop_filter_across_subpic_enabled_flag[ i ] u(1)   }  }  ... sps_sao_enabled_flag u(1)  sps_alf_enabled_flag u(1)  ... sps_loop_filter_across_virtual_boundaries_disabled_present_flag u(1) if( sps_loop_filter_across_virtual_boundaries_disabled_present_flag ) {  sps_num_ver_virtual_boundaries u(2)   for( i = 0; i <sps_num_ver_virtual_boundaries; i++ )    sps_virtual_boundaries_pos_x[ i] u(13)   sps_num_hor_virtual_boundaries u(2)   for( i = 0; i <sps_num_hor_virtual_boundaries; i++ )    sps_virtual_boundaries_pos_y[ i] u(13)  }  ... }

TABLE 2 subpics_present_flag equal to 1 specifies that subpictureparameters are present in in the SPS RBSP syntax. subpics_present_flagequal to 0 specifies that subpicture parameters are not present in theSPS RBSP syntax. sps_num_subpics_minus1 plus 1 specifies the number ofsubpictures sps_num_subpics_minus1 shall be in the range of 0 to 254.When not present, the value of sps_num_subpics_minus1 is inferred to beequal to 0. subpic_ctu_top_left_x[ i ] specifies horizontal position oftop left CTU of i-th subpicture in unit of CtbSizeY. The length of thesyntax element is Ceil( Log2( pic_width_max_in_luma_samples / CtbSizeY )) bits. When not present, the value of subpic_ctu_top_left_x[ i ] isinferred to be equal to 0. subpic_ctu_top_left_y[ i ] specifies verticalposition of top left CTU of i-th subpicture in unit of CtbSizeY. Thelength of the syntax element is Ceil( Log2(pic_height_max_in_luma_samples / CtbSizeY ) ) bits. When not present,the value of subpic_ctu_top_left_y[ i ] is inferred to be equal to 0.subpic_width_minus1[ i ] plus 1 specifies the width of the i-thsubpicture in units of CtbSizeY. The length of the syntax element isCeil( Log2( pic_width_max_in_luma_samples / CtbSizeY ) ) bits. When notpresent, the value of subpic_width_minus1[ i ] is inferred to be equalto Ceil( pic_width_max_in_luma_samples / CtbSizeY ) − 1.subpic_height_minus1[ i ] plus 1 specifies the height of the i-thsubpicture in units of CtbSizeY. The length of the syntax element isCeil( Log2( pic_height_max_in_luma_samples / CtbSizeY ) ) bits. When notpresent, the value of subpic_height_minus1[ i ] is inferred to be equalto Ceil( pic_height_max_in_luma_samples / CtbSizeY ) − 1.subpic_treated_as_pic_flag[ i ] equal to 1 specifies that the i-thsubpicture of each coded picture in the CLVS is treated as a picture inthe decoding process excluding in-loop filtering operations.subpic_treated_as_pic_flag[ i ] equal to 0 specifies that the i-thsubpicture of each coded picture in the CLVS is not treated as a picturein the decoding process excluding in-loop filtering operations. When notpresent, the value of subpic_treated_as_pic_flag[ i ] is inferred to beequal to 0. loop_filter_across_subpic_enabled_flag[ i ] equal to 1specifies that in-loop filtering operations may be performed across theboundaries of the i-th subpicture in each coded picture in the CLVS.loop_filter_across_subpic_enabled_flag[ i ] equal to 0 specifies thatin-loop filtering operations are not performed across the boundaries ofthe i-th subpicture in each coded picture in the CLVS. When not present,the value of loop_filter_across_subpic_enabled_pic_flag[ i ] is inferredto be equal to 1.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to1 specifies that the in-loop filtering operations are disabled acrossthe virtual boundaries in pictures referring to the SPS.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to0 specifies that no such disabling of in-loop filtering operations isapplied in pictures referring to the SPS. In-loop filtering operationsinclude the deblocking filter, sample adaptive offset filter, andadaptive loop filter operations. sps_sao_enabled_flag equal to 1specifies that the sample adaptive offset process is applied to thereconstructed picture after the deblocking filter process.sps_sao_enabled_flag equal to 0 specifies that the sample adaptiveoffset process is not applied to the reconstructed picture after thedeblocking filter process. sps_alf_enabled_flag equal to 0 specifiesthat the adaptive loop filter is disabled. sps_alf_enabled_flag equal to1 specifies that the adaptive loop filter is enabled.sps_num_ver_virtual_boundaries specifies the number ofsps_virtual_boundaries_pos_x[ i ] syntax elements that are present inthe SPS. When sps_num_ver_virtual_boundaries is not present, it isinferred to be equal to 0. sps_virtual_boundaries_pos_x[ i ] is used tocompute the value of VirtualBoundariesPosX[ i ], which specifies thelocation of the i-th vertical virtual boundary in units of luma samples.The value of sps_virtual_boundaries_pos_x[ i ] shall be in the range of1 to Ceil( pic_width_in_luma_samples ÷ 8 ) − 1, inclusive.sps_num_hor_virtual_boundaries specifies the number ofsps_virtual_boundaries_pos_y[ i ] syntax elements that are present inthe SPS. When sps_num_hor_virtual_boundaries is not present, it isinferred to be equal to 0. sps_virtual_boundaries_pos_y[ i ] is used tocompute the value of VirtualBoundariesPosY[ i ], which specifies thelocation of the i-th horizontal virtual boundary in units of lumasamples. The value of sps_virtual_boundaries_pos_y[ i ] shall be in therange of 1 to Ceil( pic_height_in_luma_samples ÷ 8 ) − 1, inclusive.

The following tables show an exemplary syntax and semantics of a pictureparameter set (PPS) according to the present embodiment.

TABLE 3 Descriptor pic_parameter_set_rbsp( ) {  ... no_pic_partition_flag u(1)  if( !no_pic_partition_flag ) {   ...  loop_filter_across_tiles_enabled_flag u(1)  loop_filter_across_slices_enabled_flag u(1)  }  ... deblocking_filter_control_present_flag u(1)  if(deblocking_filter_control_present_flag ) {  deblocking_filter_override_enabled_flag u(1)  pps_deblocking_filter_disabled_flag u(1)   if(!pps_deblocking_filter_disabled_flag ) {    pps_beta_offset_div2 se(v)   pps_tc_offset_div2 sc(v)   }  }  ... }

TABLE 4 no_pic_partition_flag equal to 1 specifies that no picturepartitioning applied to each picture referring to the PPS.no_pic_partition_flag equal to 0 specifies each picture referring to thePPS may be partitioned into more than one tile or slice.loop_filter_across_tiles_enabled_flag equal to 1 specifies that in-loopfiltering operations may be performed across tile boundaries in picturesreferring to the PPS. loop_filter_across_tiles_enabled_flag equal to 0specifies that in-loop filtering operations are not performed acrosstile boundaries in pictures referring to the PPS. The in-loop filteringoperations include the deblocking filter, sample adaptive offset filter,and adaptive loop filter operations.loop_filter_across_slices_enabled_flag equal to 1 specifies that in-loopfiltering operations may be performed across slice boundaries inpictures referring to the PPS. loop_filter_across_slice_enabled_flagequal to 0 specifies that in-loop filtering operations are not performedacross slice boundaries in pictures referring to the PPS. The in-loopfiltering operations include the deblocking filter, sample adaptiveoffset filter, and adaptive loop filter operations.deblocking_filter_control_present_flag equal to 1 specifies the presenceof deblocking filter control syntax elements in the PPS.deblocking_filter_control_present_flag equal to 0 specifies the absenceof deblocking filter control syntax elements in the PPS.deblocking_filter_override_enabled_flag equal to 1 specifies thepresence of pic_deblocking_filter_override_flag in the PHs referring tothe PPS or slice_deblocking_filter_override_flag in the slice headersreferring to the PPS. deblocking_filter_override_enabled_flag equal to 0specifies the absence of pic_deblocking_filter_override_flag in PHsreferring to the PPS or slice_deblocking_filter_override_flag in sliceheaders referring to the PPS. When not present, the value ofdeblocking_filter_override_enabled_flag is inferred to be equal to 0.pps_deblocking_filter_disabled_flag equal to 1 specifies that theoperation of deblocking filter is not applied for slices referring tothe PPS in which slice_deblocking_filter_disabled_flag is not present.pps_deblocking_filter_disabled_flag equal to 0 specifies that theoperation of the deblocking filter is applied for slices referring tothe PPS in which slice_deblocking_filter_disabled_flag is not present.When not present, the value of pps_deblocking_filter_disabled_flag isinferred to be equal to 0. pps_beta_offset_div2 and pps_tc_offset_div2specify the default deblocking parameter offsets for β and tC (dividedby 2) that are applied for slices referring to the PPS, unless thedefault deblocking parameter offsets are overridden by the deblockingparameter offsets present in the slice headers of the slices referringto the PPS. The values of pps_beta_offset_div2 and pps_tc_offset_div2shall both be in the range of −6 to 6, inclusive. When not present, thevalue of pps_beta_offset_div2 and pps_tc_offset_div2 are inferred to beequal to 0.

The following tables show an exemplary syntax and semantics of a pictureheader according to the present embodiment.

TABLE 5 Descriptor picture_header_rbsp( ) {  ...  if(!sps_loop_filter_across_virtual_boundaries_disabled_present_flag ) {  ph_loop_filter_across_virtual_boundaries_disabled_present_flag u(1)  if( ph_loop_filter_across_virtual_boundaries_disabled_present_flag ) {   ph_num_ver_virtual_boundaries u(2)    for( i = 0; i <ph_num_ver_virtual_boundaries; i++ )     ph_virtual_boundaries_pos_x[ i] u(13)    ph_num_hor_virtual_boundaries u(2)    for( i = 0; i <ph_num_hor_virtual_boundaries; i++ )     ph_virtual_boundaries_pos_y[ i] u(13)   }  }  ...  if( sps_sao_enabled_flag ) {  pic_sao_enabled_present_flag u(1)   if( pic_sao_enabled_present_flag ){    pic_sao_luma_enabled_flag u(1)    if(ChromaArrayType != 0 )    pic_sao_chroma_enabled_flag u(1)   }  }  if( sps_alf_enabled_flag ){   pic_alf_enabled_present_flag u(1)   if( pic_alf_enabled_present_flag) {    pic_alf_enabled_flag u(1)    if( pic_alf_enabled_flag ) {    pic_num_alf_aps_ids_luma u(3)     for( i = 0; i <pic_num_alf_aps_ids_luma; i++ )      pic_alf_aps_id_luma[ i ] u(3)    if( ChromaArrayType != 0 )      pic_alf_chroma_idc u(2)     if(pic_alf_chroma_idc )      pic_alf_aps_id_chroma u(3)    }   }  }  ... if( deblocking_filter_override_enabled_flag ) {  pic_deblocking_filter_override_present_flag u(1)   if(pic_deblocking_filter_override_present_flag ) {   pic_deblocking_filter_override_flag u(1)    if(pic_deblocking_filter_override_flag ) {    pic_deblocking_filter_disabled_flag u(1)     if(!pic_deblocking_filter_disabled_flag ) {      pic_beta_offset_div2 se(v)     pic_tc_offset_div2 se(v)     }    }   }  }  ... }

TABLE 6 ph_loop_filter_across_virtual_boundaries_disabled_present_flagequal to 1 specifies that the in-loop filtering operations are disabledacross the virtual boundaries in pictures associated to the PH.ph_loop_filter_across_virtual_boundaries_disabled_present_flag equal to0 specifies that no such disabling of in-loop filtering operations isapplied in pictures associated to the PH. The in-loop filteringoperations include the deblocking filter, sample adaptive offset filter,and adaptive loop filter operations. ph_num_ver_virtual_boundariesspecifies the number of ph_virtual_boundaries_pos_x[ i ] syntax elementsthat are present in the PH. ph_virtual_boundaries_pos_x[ i ] is used tocompute the value of VirtualBoundariesPosX[ i ], which specifies thelocation of the i-th vertical virtual boundary in units of luma samples.The value of ph_virtual_boundaries_pos_x[ i ] shall be in the range of 1to Ceil( pic_width_in_luma_samples ÷ 8 ) − 1, inclusive.ph_num_hor_virtual_boundaries specifies the number ofph_virtual_boundaries_pos_y[ i ] syntax elements that are present in thePH. ph_virtual_boundaries_pos_y[ i ] is used to compute the value ofVirtualBoundariesPosY[ i ], which specifies the location of the i-thhorizontal virtual boundary in units of luma samples. The value ofph_virtual_boundaries_pos_y[ i ] shall be in the range of 1 to Ceil(pic_height_in_luma_samples ÷ 8 ) − 1, inclusive.pic_sao_enabled_present_flag equal to 1 specifies that pic_sao_luma_flagand pic_sao_chroma_flag are present in the PH.pic_sao_enabled_present_flag equal to 0 specifies that pic_sao_luma_flagand pic_sao_chroma_flag are not present in the PH. Whenpic_sao_enabled_present_flag is not present, it is inferred to be equalto 0. pic_sao_luma_enabled_flag equal to 1 specifies that SAO is enabledfor the luma component in all slices associated with the PH;pic_sao_luma_enabled_flag equal to 0 specifies that SAO for the lumacomponent may be disabled for one, or more, or all slices associatedwith the PH. pic_sao_chroma_enabled_flag equal to 1 specifies that SAOis enabled for the chroma component in all slices associated with thePH; pic_sao_chroma_enabled_flag equal to 0 specifies that SAO for chromacomponent may be disabled for one, or more, or all slices associatedwith the PH. pic_alf_enabled_present_flag equal to 1 specifies thatpic_alf_enabled_flag, pic_num_alf_aps_ids_luma, pic_alf_aps_id_luma[ i], pic_alf_chroma_idc, and pic_alf_aps_id_chroma are present in the PH.pic_alf_enabled present_flag equal to 0 specifies thatpic_alf_enabled_flag, pic_num_alf_aps_ids_luma, pic_alf_aps_id_luma[ i], pic_alf_chroma_idc, and pic_alf_aps_id_chroma are not present in thePH. When pic_alf_enabled_present_flag is not present, it is inferred tobe equal to 0. pic_alf_enabled_flag equal to 1 specifies that adaptiveloop filter is enabled for all slices associated with the PH and may beapplied to Y, Cb, or Cr colour component in the slices.pic_alf_enabled_flag equal to 0 specifies that adaptive loop filter maybe disabled for one, or more, or all slices associated with the PH. Whennot present, pic_alf_enabled_flag is inferred to be equal to 0.pic_num_alf_aps_ids_luma specifies the number of ALF APSs that theslices associated with the PH refers to. pic_alf_aps_id_luma[ i ]specifies the adaptation_parameter_set_id of the i-th ALF APS that theluma component of the slices associated with the PH refers to. The valueof alf_luma_filter_signal_flag of the APS NAL unit havingaps_params_type equal to ALF _APS and adaptation_parameter_set_id equalto pic_alf_aps_id_luma[ i ] shall be equal to 1. pic_alf_chroma_idcequal to 0 specifies that the adaptive loop filter is not applied to Cband Cr colour components. pic_alf_chroma_idc equal to 1 indicates thatthe adaptive loop filter is applied to the Cb colour component.pic_alf_chroma_idc equal to 2 indicates that the adaptive loop filter isapplied to the Cr colour component. pic_alf_chroma_idc equal to 3indicates that the adaptive loop filter is applied to Cb and Cr colourcomponents. When pic_alf_chroma_idc is not present, it is inferred to beequal to 0. pic_alf_aps_id_chroma specifies theadaptation_parameter_set_id of the ALF APS that the chroma component ofthe slices associated with the PH refers to.pic_deblocking_filter_override_present_flag equal to 1 specifies thatpic_deblocking_filter_override_flag is present in the PH.pic_deblocking_filter_override_present_flag equal to 0 specifies thatpic_deblocking_filter_override_flag is not present in the PH. Whenpic_deblocking_filter_override_present_flag is not present, it isinferred to be equal to 0. pic_deblocking_filter_override_flag equal to1 specifies that deblocking parameters are present in the PH.pic_deblocking_filter_override_flag equal to 0 specifies that deblockingparameters are not present in the PH. When not present, the value ofpic_pic_deblocking_filter_override_flag is inferred to be equal to 0.pic_deblocking_filter_disabled_flag equal to 1 specifies that theoperation of the deblocking filter is not applied for the slicesassociated with the PH. pic_deblocking_filter_disabled_flag equal to 0specifies that the operation of the deblocking filter is applied for theslices associated with the PH. When pic_deblocking_filter_disabled_flagis not present, it is inferred to be equal topps_deblocking_filter_disabled_flag. pic_beta_offset_div2 andpic_tc_offset_div2 specify the deblocking parameter offsets for β and tC(divided by 2) for the slices associated with the PH. The values ofpic_beta_offset_div2 and pic_tc_offset_div2 shall both be in the rangeof −6 to 6, inclusive. When not present, the values ofpic_beta_offset_div2 and pic_tc_offset_div2 are inferred to be equal topps_beta_offset_div2 and pps_tc_offset_div2, respectively.

The following tables show an exemplary syntax and semantics of a sliceheader according to the present embodiment.

TABLE 7 Descriptor slice_header( ) {  ...  if(pps_cu_chroma_qp_offset_list_enabled_flag )  cu_chroma_qp_offset_enabled_flag u(1)  if( sps_sao_enabled_flag && !pic_sao_enabled_present_flag ) {   slice_sao_luma_flag u(1)   if(ChromaArrayType != 0 )    slice_sao_chroma_flag u(1)  }  if(sps_alf_enabled_flag &&  !pic_alf_enabled_present_flag ) {  slice_alf_enabled_flag u(1)   if( slice_alf_enabled_flag ) {   slice_num_alf_aps_ids_luma u(3)    for( i = 0; i <slice_num_alf_aps_ids_luma; i++)     slice_alf_aps_id_luma[ i ] u(3)   if( ChromaArrayType != 0 )     slice_alf_chroma_idc u(2)    if(slice_alf_chroma_idc )     slice_alf_aps_id_chroma u(3)   }  }  if(deblocking_filter_override_enabled_flag &&     !pic_deblocking_filter_override_present_flag )  slice_deblocking_filter_override_flag u(1)  if(slice_deblocking_filter_override_flag ) {  slice_deblocking_filter_disabled_flag u(1)   if(!slice_deblocking_filter_disabled_flag ) {   slice_beta_offset_div2se(v)   slice_tc_offset_div2 se(v)   }  }  ... }

TABLE 8 cu_chroma_qp_offset_enabled_flag equal to 1 specifies that thecu_chroma_qp_offset_flag may be present in the transform unit andpalette coding syntax. cu_chroma_qp_offset_enabled_flag equal to 0specifies that the cu_chroma_qp_offset_flag is not present in thetransform unit or palette coding syntax. When not present, the value ofcu_chroma_qp_offset_enabled_flag is inferred to be equal to 0.slice_sao_luma_flag equal to 1 specifies that SAO is enabled for theluma component in the current slice; slice_sao_luma_flag equal to 0specifies that SAO is disabled for the luma component in the currentslice. When slice_sao_luma_flag is not present, it is inferred to beequal to pic_sao_luma_enabled_flag. slice_sao_chroma_flag equal to 1specifies that SAO is enabled for the chroma component in the currentslice; slice_sao_chroma_flag equal to 0 specifies that SAO is disabledfor the chroma component in the current slice. Whenslice_sao_chroma_flag is not present, it is inferred to be equal topic_sao_chroma_enabled_flag. slice_alf_enabled_flag equal to 1 specifiesthat adaptive loop filter is enabled and may be applied to Y, Cb, or Crcolour component in a slice. slice_alf_enabled_flag equal to 0 specifiesthat adaptive loop filter is disabled for all colour components in aslice. When not present, the value of slice_alf_enabled_flag is inferredto be equal to pic_alf_enabled_flag. slice_num_alf_aps_ids_lumaspecifies the number of ALF APSs that the slice refers to. Whenslice_alf_enabled_flag is equal to 1 and slice_num_alf_aps_ids_luma isnot present, the value of slice_num_alf_aps_ids_luma is inferred to beequal to the value of pic_num_alf_aps_ids_luma. slice_alf_aps_id_luma[ i] specifies the adaptation_parameter_set_id of the i-th ALF APS that theluma component of the slice refers to. The TemporalId of the APS NALunit having aps_params_type equal to ALF _APS andadaptation_parameter_set_id equal to slice_alf_aps_id_luma[ i ] shall beless than or equal to the TemporalId of the coded slice NAL unit. Whenslice_alf_enabled_flag is equal to 1 and slice_alf_aps_id_luma[ i ] isnot present, the value of slice_alf_aps_id_luma[ i ] is inferred to beequal to the value of pic_alf_aps_id_luma[ i ]. The value ofalf_luma_filter_signal_flag of the APS NAL unit having aps_params_typeequal to ALF _APS and adaptation_parameter_set_id equal toslice_alf_aps_id_luma[ i ] shall be equal to 1. slice_alf_chroma_idcequal to 0 specifies that the adaptive loop filter is not applied to Cband Cr colour components. slice_alf_chroma_idc equal to 1 indicates thatthe adaptive loop filter is applied to the Cb colour component.slice_alf_chroma_idc equal to 2 indicates that the adaptive loop filteris applied to the Cr colour component. slice_alf_chroma_idc equal to 3indicates that the adaptive loop filter is applied to Cb and Cr colourcomponents. When slice_alf_chroma_idc is not present, it is inferred tobe equal to pic_alf_chroma_idc. slice_alf_aps_id_chroma specifies theadaptation_parameter_set_id of the ALF APS that the chroma component ofthe slice refers to. The TemporalId of the APS NAL unit havingaps_params_type equal to ALF _APS and adaptation_parameter_set_id equalto slice_alf_aps_id_chroma shall be less than or equal to the TemporalIdof the coded slice NAL unit. When slice_alf_enabled_flag is equal to 1and slice_alf_aps_id_chroma is not present, the value ofslice_alf_aps_id_chroma is inferred to be equal to the value ofpic_alf_aps_id_chroma. The value of alf_chroma_filter_signal_flag of theAPS NAL unit having aps_params_type equal to ALF _APS andadaptation_parameter_set_id equal to slice_alf_aps_id_chroma shall beequal to 1. slice_deblocking_filter_override_flag equal to 1 specifiesthat deblocking parameters are present in the slice header.slice_deblocking_filter_override_flag equal to 0 specifies thatdeblocking parameters are not present in the slice header. When notpresent, the value of slice_deblocking_filter_override_flag is inferredto be equal to pic_deblocking_filter_override_flag.slice_deblocking_filter_disabled_flag equal to 1 specifies that theoperation of the deblocking filter is not applied for the current slice.slice_deblocking_filter_disabled_flag equal to 0 specifies that theoperation of the deblocking filter is applied for the current slice.When slice_deblocking_filter_disabled_flag is not present, it isinferred to be equal to pic_deblocking_filter_disabled_flag.slice_beta_offset_div2 and slice_tc_offset_div2 specify the deblockingparameter offsets for β and tC (divided by 2) for the current slice. Thevalues of slice_beta_offset_div2 and slice_tc_offset_div2 shall both bein the range of −6 to 6, inclusive. When not present, the values ofslice_beta_offset_div2 and slice_tc_offset_div2 are inferred to be equalto pic_beta_offset_div2 and pic_tc_offset_div2, respectively.

Hereinafter, signaling of information on virtual boundaries which may beused in in-loop filtering will be described.

In the existing design, in order to disable loop filters across virtualboundaries, there are two options, that is, an option i) in which an SPSvirtual boundaries present flag(sps_loop_filter_across_virtual_boundaries_disabled_present_flag) may beset to 0, and for every picture header, a PH virtual boundaries presentflag (ph_loop_filter_across_virtual_boundaries_disabled_present_flag)may be present and set to 0, and an option ii) in which the SPS virtualboundaries present flag(sps_loop_filter_across_virtual_boundaries_disabled_present_flag) may beset to 1, and information on the number of SPS vertical virtualboundaries (sps_num_ver_vertical_boundaries) and information on thenumber of SPS horizontal virtual boundaries(sps_num_hor_vertical_boundaries) may be set to 0.

In the existing design, according to the option ii), the SPS virtualboundaries present flag(sps_loop_filter_across_virtual_boundaries_disabled_present_flag) is setto 1, and thus a decoder expects signaling on locations of virtualboundaries, which may cause a problem in a decoding process.

Embodiments described hereinafter may propose solutions for theaforementioned problem. The embodiments may be applied independently.Alternatively, at least two embodiments may be applied in combination.

In an embodiment of the present document, whether syntax elements forindicating virtual boundaries are included in the SPS may be controlledby flag(s). For example, the number of flag(s) may be 2 (e.g., SPSvirtual boundaries enabled flag, SPS virtual boundaries present flag).

In an example according to the present embodiment, the SPS virtualboundaries enabled flag may be referred to assps_loop_filter_across_virtual_boundaries_disabled_flag (orsps_virtual_boundaries_enabled_flag). The SPS virtual boundaries enabledflag may indicate whether a feature for disabling a loop filter acrossvirtual boundaries is enabled.

In an example according to the present embodiment, the SPS virtualboundaries present flag may be referred to assps_loop_filter_across_virtual_boundaries_disabled_present_flag (orsps_virtual_boundaries_present_flag). The SPS virtual boundaries presentflag may indicate whether signaling information for virtual boundariesis included in the SPS or in a picture header (PH).

In an example according to the present embodiment, when the SPS virtualboundaries enabled flag(sps_loop_filter_across_virtual_boundaries_disabled_flag) is 1 and theSPS virtual boundaries present flag(sps_loop_filter_across_virtual_boundaries_disabled_present_flag) is 0,the signaling information for disabling the loop filter across thevirtual boundaries may be included in the PH.

In an example according to the present embodiment, when information onpositions of virtual boundaries (e.g., vertical virtual boundaries,horizontal virtual boundaries) is included in the SPS, it may beconstrained that a sum of the number of vertical virtual boundaries andthe number of horizontal virtual boundaries is greater than 0.

In an example according to the present embodiment, variable(s)indicating whether a filter is disabled at virtual boundaries for thecurrent picture may be derived. For example, the variable(s) may includeVirtualBoundariesDisabledFlag.

As one case of the present example, when the SPS virtual boundariesenable flag (sps_loop_filter_across_virtual_boundaries_disabled_flag) is1 and the SPS virtual boundaries present flag(sps_loop_filter_across_virtual_boundaries_disabled_present_flag) is 1,VirtualBoundariesDisabledFlag may be 1.

As another case of the present example, when the SPS virtual boundariesenabled flag (sps_loop_filter_across_virtual_boundaries_disabled_flag)is 1, the SPS virtual boundaries present flag(sps_loop_filter_across_virtual_boundaries_disabled_present_flag) is 0,and a sum of information on the number of vertical virtual boundaries(e.g., ph_num_ver_virtual_boundaries) and information on the number ofhorizontal virtual boundaries (e.g., ph_num_hor_virtual_boundaries) isgreater than 0, VirtualBoundariesDisabledFlag may be 1.

In the other cases of the present example, VirtualBoundariesDisabledFlagmay be 0.

The following table shows an exemplary syntax of the SPS according tothe present embodiment.

TABLE 9 Descriptor seq_parameter_set_rbsp( ) { sps_decoding_parameter_set_id u(4)  ... sps_loop_filter_across_virtual_boundaries_disabled_flag u(1)  if(sps_loop_filter_across_virtual_boundaries_disabled_flag ) {  sps_loop_filter_across_virtual_boundaries_disabled_present_flag u(1)  if( sps_loop_filter_across_virtual_boundaries_disabled_present_flag ){    sps_num_ver_virtual_boundaries u(2)    for( i = 0; i <sps_num_ver_virtual_boundaries; i++ )     sps_virtual_boundaries_pos_x[i ] u(13)    sps_num_hor_virtual_boundaries u(2)    for( i = 0; i <sps_num_hor_virtual_boundaries; i++ )     sps_virtual_boundaries_pos_y[i ] u(13)   }  }  ... }

The following table shows an exemplary semantics of syntax elementsincluded in the syntax.

TABLE 10 sps_loop_filter_across_virtual_boundaries_disabled_flag equalto 1 specifies that the in-loop filtering operations are disabled acrossthe virtual boundaries in pictures referring to the SPS.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to0 specifies that no such disabling of in-loop filtering operations isapplied in pictures referring to the SPS. In-loop filtering operationsinclude the deblocking filter, sample adaptive offset filter, andadaptive loop filter operations.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to1 specifies that the syntax elements for the in-loop filteringoperations for the virtual boundaries is present in the SPS.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to0 specifies that the syntax elements for the virtual boundaries in-loopfiltering operations is not present in the SPS. In-loop filteringoperations include the deblocking filter, sample adaptive offset filter,and adaptive loop filter operations. When gdr_enabled_flag is equal to1, sps_loop_filter_across_virtual_boundaries_disabled_flag is constraintto be 1 andsps_loop_filter_across_virtual_boundaries_disabled_present_flag isconstraint to be 0. sps_num_ver_virtual_boundaries specifies the numberof sps_virtual_boundaries_pos_x[ i ] syntax elements that are present inthe SPS. When sps_num_ver_virtual_boundaries is not present, it isinferred to be equal to 0. sps_virtual_boundaries_pos_x[ i ] is used tocompute the value of VirtualBoundariesPosX[ i ], which specifies thelocation of the i-th vertical virtual boundary in units of luma samples.sps_virtual_boundaries_pos_x[ i ] shall be in the range of 1 to Ceil(pic_width_in_luma_samples ÷ 8 ) − 1, inclusive.sps_num_hor_virtual_boundaries specifies the number ofsps_virtual_boundaries_pos_y[ i ] syntax elements that are present inthe SPS. When sps_num_hor_virtual_boundaries is not present, it isinferred to be equal to 0. Whensps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1and sps_loop_filter_across_virtual_boundaries_disabled_present_flag isequal to 1, the sum of sps_num_ver_virtual_boundaries andsps_num_hor_virtual_boundaries shall be greater than 0.sps_virtual_boundaries_pos_y[ i ] is used to compute the value ofVirtualBoundariesPosY[ i ], which specifies the location of the i-thhorizontal virtual boundary in units of luma samples.sps_virtual_boundaries_pos_y[ i ] shall be in the range of 1 to Ceil(pic_height_in_luma_samples ÷ 8 ) − 1, inclusive.

The following table shows an exemplary syntax of the header information(the picture header) according to the present embodiment.

TABLE 11 Descriptor picture_header_rbsp( ) {  non_reference_picture_flagu(1)  ...  if( sps_loop_filter_across_virtual_boundaries_disabled_flag&&    !sps_loop_filter_across_virtual_boundaries_disabled_present_flag ){   ph_num_ver_virtual_boundaries u(2)   for( i = 0; i <ph_num_ver_virtual_boundaries; i++ )    ph_virtual_boundaries_pos_x[ i ]u(13)   ph_num_hor_virtual_boundaries u(2)   for( i = 0; i <ph_num_hor_virtual_boundaries; i++ )    ph_virtual_boundaries_pos_y[ i ]ue(v)  }  ... }

The following table shows an exemplary semantics of syntax elementsincluded in the syntax.

TABLE 12 ph_num_ver_virtual_boundaries specifies the number ofph_virtual_boundaries_pos_x[ i ] syntax elements that are present in thePH. When ph_num_ver_virtual_boundaries is not present, it is inferred tobe equal to 0. ph_num_hor_virtual_boundaries specifies the number ofph_virtual_boundaries_pos_y[ i ] syntax elements that are present in thePH. When ph_num_hor_virtual_boundaries is not present, it is inferred tobe equal to 0. The parameter VirtualBoundariesDisabledFlag is derived asfollows:  VirtualBoundariesDisabledFlag = 0  if(sps_loop_filter_across_virtual_boundaries_disabled_flag )   if(sps_loop_filter_across_virtual_boundaries_disabled_present_flag | |    ( ph_num_ver_virtual_boundaries + ph_num_ver_virtual_boundaries > 0) )    VirtualBoundariesDisabledFlag = 1 The parameterVirtualBoundariesNumVer is derived as follows:  VirtualBoundariesNumVer= 0  if( sps_loop_filter_across_virtual_boundaries_disabled_flag )   VirtualBoundariesNumVer = sps_loop_filter_across_virtual_boundaries_disabled_present_flag ?   sps_num_ver_virtual_boundaries : ph_num_ver_virtual_boundaries (7-43)ph_virtual_boundaries_pos_x[ i ] is used to compute the value ofVirtualBoundariesPosX[ i ], which specifies the location of the i-thvertical virtual boundary in units of luma samples.ph_virtual_boundaries_pos_x[ i ] shall be in the range of 1 to Ceil(pic_width_in_luma_samples ÷ 8 ) − 1, inclusive. The location of thevertical virtual boundary VirtualBoundariesPosX[ i ] is derived asfollows:  VirtualBoundariesPosX[ i ]=0  if(sps_loop_filter_across)_virtual_boundaries_disabled_flag )  VirtualBoundariesPosX[ i ] = (sps_loop_filter_across_virtual_boundaries_disabled_present_flag ?   sps_virtual_boundaries_pos_x[ i ] : ph_virtual_boundaries_pos_x[ i]) * 8 (7-44) The distance between any two vertical virtual boundariesshall be greater than or equal to CtbSizeY luma samples.ph_num_hor_virtual_boundaries specifies the number ofph_virtual_boundaries_pos_y[ i ] syntax elements that are present in thePH. When ph_num_hor_virtual_boundaries is not present, it is inferred tobe equal to 0. The parameter VirtualBoundariesNumHor is derived asfollows:  VirtualBoundariesNumHor = 0  if(sps_loop_filter_across_virtual_boundaries_disabled_flag )  VirtualBoundariesNumHor = sps_loop_filter_across_virtual_boundaries_disabled_present_flag ?    sps_num_hor_virtual_boundaries : ph_num_hor_virtual_boundaries(7-45) ph_virtual_boundaries_pos_y[ i ] is used to compute the value ofVirtualBoundariesPosY[ i ], which specifies the location of the i-thhorizontal virtual boundary in units of luma samples.ph_virtual_boundaries_pos_y[ i ] shall be in the range of 1 to Ceil(pic_height_in_luma_samples ÷ 8 ) − 1, inclusive. The location of thehorizontal virtual boundary VirtualBoundariesPosY[ i ] is derived asfollows:  VirtualBoundariesPosY[ i ]  if(sps_loop_filter_across_virtual_boundaries_disabled_flag )  VirtualBoundariesPosY[ i ] = (sps_loop_filter_across_virtual_boundaries_disabled_present_flag ?   sps_virtual_boundaries_pos_y[ i ] : ph_virtual_boundaries_pos_y[ i]) * 8 (7-46) The distance between any two horizontal virtual boundariesshall be greater than or equal to CtbSizeY luma samples.

In an embodiment related to Table 9 to Table 12, image informationobtained by the encoding apparatus and/or image information obtainedthrough a bitstream received from the encoding apparatus to the decodingapparatus may include a sequence parameter set (SPS) and a pictureheader (PH). The SPS may include a virtual boundaries enabled flag(sps_loop_filter_across_virtual_boundaries_disabled_flag). The SPS mayinclude an SPS virtual boundaries present flag(sps_loop_filter_across_virtual_boundaries_disabled_present_flag), basedon the virtual boundaries enabled flag.

For example, when a value of the virtual boundaries enabled flag is 1,the SPS may include the SPS virtual boundaries present flag. Based onthe virtual boundaries enabled flag and the SPS virtual boundariespresent flag, the SPS may include information on the number of SPSvertical virtual boundaries (sps_num_ver_virtual_boundaries),information on an SPS vertical virtual boundaries position(sps_virtual_boundaries_pos_x[i]), information on the number of SPShorizontal virtual boundaries (sps_num_hor_virtual_boundaries), andinformation on an SPS horizontal virtual boundaries position(sps_virtual_boundaries_pos_y[i]). For example, when a value of thevirtual boundaries enabled flag is 1 and a value of the SPS virtualboundaries present flag is 1, the SPS may include information on thenumber of the SPS vertical virtual boundaries, information on the SPSvertical virtual boundaries position, information on the number of theSPS horizontal virtual boundaries, and information on the SPS horizontalvirtual boundaries position.

In an example, the number of pieces of information on the SPS verticalvirtual boundaries position may be determined based on the informationon the number of the SPS vertical virtual boundaries, and the number ofpieces of information on the SPS horizontal virtual boundaries positionmay be determined based on the information on the number of the SPShorizontal virtual boundaries. Based on the virtual boundaries enabledflag and the SPS virtual boundaries present flag, the picture header mayinclude information on the number of PH vertical virtual boundaries(ph_num_ver_virtual_boundaries), information on a PH vertical virtualboundaries position (ph_virtual_boundaries_pos_x[i]), information on thenumber of PH horizontal virtual boundaries(ph_num_hor_virtual_boundaries), and information on a PH horizontalvirtual boundaries position (ph_virtual_boundaries_pos_y[i]).

For example, when a value of the virtual boundaries enabled flag is 1and a value of the SPS virtual boundaries present flag is 0, the pictureheader may include information on the number of the PH vertical virtualboundaries, information on the PH vertical virtual boundaries position,information on the number of the PH horizontal virtual boundaries, andinformation on the PH horizontal virtual boundary position. In anexample, the number of pieces of information on the PH vertical virtualboundaries position may be determined based on the information on thenumber of the PH vertical virtual boundaries, and the number of piecesof information on the PH horizontal virtual boundaries position may bedetermined based on the information on the number of the PH horizontalvirtual boundaries.

In another embodiment of the present document, each piece of headerinformation (picture headers) of pictures referring to the SPS mayinclude a PH virtual boundaries present flag(ph_loop_filter_across_virtual_boundaries_disabled_present_flag orph_virtual_boundaries_present_flag). The present embodiment may also bedescribed together with the SPS virtual boundaries enabled flag(sps_loop_filter_across_virtual_boundaries_disabled_flag) and the SPSvirtual boundaries present flag(sps_loop_filter_across_virtual_boundaries_disabled_present_flag).

In an example according to the present embodiment, when a value of theSPS virtual boundaries enabled flag(sps_loop_filter_across_virtual_boundaries_disabled_flag) is 1 and avalue of the SPS virtual boundaries present flag(sps_loop_filter_across_virtual_boundaries_disabled_present_flag) is 0,each piece of information (picture headers) of pictures referring to theSPS may include a PH virtual boundaries present flag(ph_loop_filter_across_virtual_boundaries_disalbed_present_flag orph_virtual_boundaries_present_flag).

In an example according to the present embodiment, when information onpositions of virtual boundaries (e.g., vertical virtual boundaries,horizontal virtual boundaries) is included in the SPS, a sum of thenumber of vertical virtual boundaries and the number of horizontalvirtual boundaries may be constraint to be greater than 0.

In an example according to the present embodiment, variable(s)indicating whether a filter is disabled at virtual boundaries may bederived for the current picture. For example, the variable(s) mayinclude VirtualBoundariesDisabledFlag.

As one case of the present example, when the SPS virtual boundariesenabled flag (sps_loop_filter_across_virtual_boundaries_disabled_flag)is 1 and the SPS virtual boundaries present flag(sps_loop_filter_across_virtual_boundaries_disabled_present_flag) is 1,VirtualBoundariesDisabledFlag may be 1.

As another case of the present example, when the SPS virtual boundariesenabled flag (sps_loop_filter_across_virtual_boundaries_disabled_flag)is 1 and the PH virtual boundaries present flag(ph_loop_filter_across_virtual_boundaries_disabled_present_flag) is 1,VirtualBoundariesDisabledFlag may be 1.

In other cases of the present example, VirtualBoundariesDisabledFlag maybe 0.

The following table shows an exemplary syntax of the SPS according tothe present embodiment.

TABLE 13 Descriptor seq_parameter_set_rbsp( ) { sps_decoding_parameter_set_id u(4)  ... sps_loop_filter_across_virtual_boundaries_disabled_flag u(1)  if( sps_loop_filter_across_virtual_boundaries_disabled_flag ) {  sps_loop_filter_across_virtual_boundaries_disabled_present_flag u(1)  if( sps_loop filter_across_virtual_boundaries_disabled_present_flag ){    sps_num_ver_virtual_boundaries u(2)    for( i = 0; i <sps_num_ver_virtual_boundaries; i++ )     sps_virtual_boundaries_pos_x[i ] u(13)    sps_num_hor_virtual_boundaries u(2)    for( i = 0; i <sps_num_hor_virtual_boundaries; i++ )     sps_virtual_boundaries_pos_y[i ] u(13)   }  }  ... }

The following table shows an exemplary semantics of syntax elementsincluded in the syntax.

TABLE 14 sps_loop_filter_across_virtual_boundaries_disabled_flag equalto 1 specifies that the in-loop filtering operations are disabled acrossthe virtual boundaries in pictures referring to the SPS.sps_loop_filter_across_virtual_boundaries_disabled_present_flag cqual to0 specifies that no such disabling of in-loop filtering operations isapplied in pictures referring to the SPS. In-loop filtering operationsinclude the deblocking filter, sample adaptive offset filter, andadaptive loop filter operations.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to1 specifies that the syntax elements for the in-loop filteringoperations for the virtual boundaries is present in the SPS.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to0 specifies that the syntax elements for the virtual boundaries in-loopfiltering operations is not present in the SPS. In-loop filteringoperations include the deblocking filter, sample adaptive offset filter,and adaptive loop filter operations. When gdr_enabled_flag is equal to1, sps_loop_filter_across_virtual_boundaries_disabled_flag is constraintto be 1 andsps_loop_filter_across_virtual_boundaries_disabled_present_flag isconstraint to be 0. sps_num_ver_virtual_boundaries specifies the numberof sps_virtual_boundaries_pos_x[ i ] syntax elements that are present inthe SPS. When sps_num_ver_virtual_boundaries is not present, it isinferred to be equal to 0. sps_virtual_boundaries_pos_x[ i ] is used tocompute the value of VirtualBoundariesPosX[ i ], which specifies thelocation of the i-th vertical virtual boundary in units of luma samples.sps_virtual_boundaries_pos_x[ i ] shall be in the range of 1 to Ceil(pic_width_in_luma_samples ÷ 8 ) − 1, inclusive.sps_num_hor_virtual_boundaries specifies the number ofsps_virtual_boundaries_pos_y[ i ] syntax elements that are present inthe SPS. When sps_num_hor_virtual_boundaries is not present, it isinferred to be equal to 0. Whensps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1and sps_loop_filter_across_virtual_boundaries_disabled_present_flag isequal to 1, the sum of sps_num_ver_virtual_boundaries andsps_num_hor_virtual_boundaries shall be greater than 0.sps_virtual_boundaries_pos_y[ i ] is used to compute the value ofVirtualBoundariesPosY[ i ], which specifies the location of the i-thhorizontal virtual boundary in units of luma samples.sps_virtual_boundaries_pos_y[ i ] shall be in the range of 1 to Ceil(pic_height_in_luma_samples ÷ 8 ) − 1, inclusive.

The following table shows an exemplary syntax of the header information(the picture header) according to the present embodiment.

TABLE 15 Descriptor picture_header_rbsp( ) {  non_reference_picture_flagu(1)  ...  if( sps_loop_filter_across_virtual_boundaries_disabled_flag&&    !sps_loop_filter_across_virtual_boundaries_disabled_present_flag ){   ph_loop_filter_across_virtual_boundaries_disabled_present_flag u(1)  if( ph_loop_filter_across_virtual_boundaries_disabled_present_flag ) {   ph_num_ver_virtual_boundaries u(2)    for( i = 0; i <ph_num_ver_virtual_boundaries; i++ )     ph_virtual_boundaries_pos_x[ i] u(13)    ph_num_hor_virtual_boundaries u(2)    for( i = 0; i <ph_num_hor_virtual_boundaries; i++ )     ph_virtual_boundaries_pos_y[ i] u(13)   }  }  ... }

The following table shows an exemplary semantics of syntax elementsincluded in the syntax.

TABLE 16 ph_loop_filter_across_virtual_boundaries_disabled_present_flagequal to 1 specifics that the in-loop filtering operations are disabledacross the virtual boundaries in pictures associated to the PH.ph_loop_filter_across_virtual_boundaries_disabled_present_flag equal to0 specifies that no such disabling of in-loop filtering operations isapplied in pictures associated to the PH. The in-loop filteringoperations include the deblocking filter, sample adaptive offset filter,and adaptive loop filter operations. When not present, the value ofph_loop_filter_across_virtual_boundaries_disabled_present_flag isinferred to be equal to 0. The parameter VirtualBoundariesDisabledFlagis derived as follows:  VirtualBoundariesDisabledFlag = 0  if(sps_loop_filter_across_virtual_boundaries_disabled_flag )  VirtualBoundariesDisabledFlag = sps_loop_filter_across_virtual_boundaries_disabled_present_flag     | |ph_loop_filter_across_virtual_boundaries_disabled_present_flagAlternatively, the following constraint may be specified: Whensps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1and sps_loop_filter_across_virtual_boundaries_disabled_present_flag isequal to 0,ph_loop_filter_across_virtual_boundaries_disabled_present_flag is equalto 1 ph_num_ver_virtual_boundaries specifies the number ofph_virtual_boundaries_pos_x[ i ] syntax elements that are present in thePH. When ph_num_ver_virtual_boundaries is not present, it is inferred tobe equal to 0. The parameter VirtualBoundariesNumVer is derived asfollows:  VirtualBoundariesNumVer = 0  if(sps_loop_filter_across_virtual_boundaries_disabled_flag )   VirtualBoundariesNumVer =  sps_loop_filter_across_virtual_boundariesdisabled present_flag ?      sps_num_ver_virtual_boundaries :ph_num_ver_virtual_boundaries (7-43) ph_num_hor_virtual_boundariesspecifies the number of ph_virtual_boundaries_pos_y[ i ] syntax elementsthat are present in the PH. When ph_num_hor_virtual_boundaries is notpresent, it is inferred to be equal to 0. The distance between any twovertical virtual boundaries shall be greater than or equal to CtbSizeYluma samples. The location of the vertical virtual boundaryVirtualBoundariesPosX[ i ] is derived as follows: VirtualBoundariesPosX[ i ] = 0  if(sps_loop_filter_across_virtual_boundaries_disabled_flag )  VirtualBoundariesPosX[ i ] = (sps_loop_filter_across_virtual_boundaries_disabled_present_flag ?    sps_virtual_boundaries_pos_x[ i ] : ph_virtual_boundaries_pos_x[ i]) * 8 ph_virtual_boundaries_pos_x[ i ] is used to compute the value ofVirtualBoundariesPosX[ i ], which specifies the location of the i-thvertical virtual boundary in units of luma samples.ph_virtual_boundaries_pos_ x[ i ] shall be in the range of 1 to Ceil(pic_width_in_luma_samples ÷ 8 ) − 1, inclusive. The location of thevertical virtual boundary VirtualBoundariesPosX[ i ] is derived asfollows:  VirtualBoundariesPosX[ i ] = 0  if(sps_loop_filter_across_virtual_boundaries_disabled_flag )  VirtualBoundariesPosX[ i ] = (sps_loop_filter_across_virtual_boundaries_disabled_present_flag ?   sps_virtual_boundaries_pos_x[ i ] : ph_virtual_boundaries_pos_x[ i]) * 8 (7-44) The distance between any two vertical virtual boundariesshall be greater than or equal to CtbSizeY luma samples.ph_num_hor_virtual_boundaries specifies the number ofph_virtual_boundaries_pos_y[ i ] syntax elements that are present in thePH. When ph_num_hor_virtual_boundaries is not present, it is inferred tobe equal to 0. The parameter VirtualBoundariesNumHor is derived asfollows:  VirtualBoundariesNumHor = 0  if(sps_loop_filter_across_virtual_boundaries_disabled_flag )  VirtualBoundariesNumHor = sps_loop_filter_across_virtual_boundaries_disabled_present_flag ?     sps_num_hor_virtual_boundaries : ph_num_hor_virtual_boundaries(7-45) ph_virtual_boundaries_pos_y[ i ] is used to compute the value ofVirtualBoundariesPosY[ i ], which specifies the location of the i-thhorizontal virtual boundary in units of luma samples.ph_virtual_boundaries_pos_y[ i ] shall be in the range of 1 to Ceil(pic_height_in_luma_samples ÷ 8) − 1, inclusive. The location of thehorizontal virtual boundary VirtualBoundariesPosY[ i ] is derived asfollows:  VirtualBoundariesPosY[ i ] = 0  if(sps_loop_filter_across_virtual_boundaries_disabled_flag )  VirtualBoundariesPosY[ i ] = (sps_loop_filter_across_virtual_boundaries_disabled_present_flag ?    sps_virtual_boundaries_pos_y[ i ] : ph_virtual_boundaries_pos_y[ i]) *8 (7-46) The distance between any two horizontal virtual boundariesshall be greater than or equal to CtbSizeY luma samples Whensps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1and ph_loop_filter_across_virtual_boundaries_disabled_present_flag isequal to 1, the sum of ph_num_ver_virtual_boundaries andph_num_hor_virtual_boundaries shall be greater than 0.

In an embodiment related to Table 13 to Table 16, image informationobtained by the encoding apparatus and/or image information obtainedthrough a bitstream received from the encoding apparatus to the decodingapparatus may include a sequence parameter set (SPS) and a pictureheader (PH). The SPS may include a virtual boundaries enabled flag(sps_loop_filter_across_virtual_boundaries_disabled_flag). The SPS mayinclude an SPS virtual boundaries present flag(sps_loop_filter_across_virtual_boundaries_disabled_present_flag), basedon the virtual boundaries enabled flag. For example, when a value of thevirtual boundaries enabled flag is 1, the SPS may include the SPSvirtual boundaries present flag. Based on the virtual boundaries enabledflag and the SPS virtual boundaries present flag, the SPS may includeinformation on the number of SPS vertical virtual boundaries(sps_num_ver_virtual_boundaries), information on an SPS vertical virtualboundaries position (sps_virtual_boundaries_pos_x[i]), information onthe number of SPS horizontal virtual boundaries(sps_num_hor_virtual_boundaries), and information on an SPS horizontalvirtual boundaries position (sps_virtual_boundaries_pos_y[i]).

For example, when a value of the virtual boundaries enabled flag is 1and a value of the SPS virtual boundaries present flag is 1, the SPS mayinclude information on the number of the SPS vertical virtualboundaries, information on the SPS vertical virtual boundaries position,information on the number of the SPS horizontal virtual boundaries, andinformation on the SPS horizontal virtual boundaries position. In anexample, the number of pieces of information on the SPS vertical virtualboundaries position may be determined based on the information on thenumber of the SPS vertical virtual boundaries, and the number of piecesof information on the SPS horizontal virtual boundaries position may bedetermined based on the information on the number of the SPS horizontalvirtual boundaries. The picture header may include a PH virtualboundaries present flag, based on the virtual boundaries enabled flagand the SPS virtual boundaries present flag.

For example, when a value of the virtual boundaries enabled flag is 1and a value of the SPS virtual boundaries present flag is 0, the pictureheader may include the PH virtual boundaries present flag. Based on thePH virtual boundaries present flag, the picture header may includeinformation on the number of PH vertical virtual boundaries(ph_num_ver_virtual_boundaries), information on a PH vertical virtualboundaries position (ph_virtual_boundaries_pos_x[i]), information on thenumber of PH horizontal virtual boundaries(ph_num_hor_virtual_boundaries), and information on a PH horizontalvirtual boundaries position (ph_virtual_boundaries_pos_y[i]).

For example, when a value of the PH virtual boundaries present flag is1, the picture header may include information on the number of PHvertical virtual boundaries, information on the PH vertical virtualboundaries position, information on the number of PH horizontal virtualboundaries, and information on the PH horizontal virtual boundariesposition. In an example, the number of pieces of information on the PHvertical virtual boundaries position may be determined based on theinformation on the number of the PH vertical virtual boundaries, and thenumber of pieces of information on the PH horizontal virtual boundariesposition may be determined based on the information on the number of thePH horizontal virtual boundaries.

In another embodiment of the present document, whether syntax elementsfor indicating virtual boundaries are included in the SPS may becontrolled by flag(s). For example, the number of flag(s) may be 2(e.g., SPS virtual boundaries present flag, SPS PH virtual boundariespresent flag).

In an example according to the present embodiment, the SPS virtualboundaries present flag may be referred to assps_loop_filter_across_virtual_boundaries_disabled_present_flag (orsps_virtual_boundaries_present_flag). The SPS virtual boundaries presentflag may indicate whether virtual boundaries information is included inthe SPS.

In an example according to the disclosure, the SPS PH virtual boundariespresent flag may be referred to assps_ph_loop_filter_across_virtual_boundaries_disabled_present_flag. TheSPS PH virtual boundaries present flag may indicate whether virtualboundaries information is included in a picture header (PH).

In an example according to the present embodiment, it may be furtherconstrained that, when the SPS virtual boundaries present flag(sps_loop_filter_across_virtual_boundaries_disabled_present_flag) is 1,the SPS PH virtual boundaries present flag(sps_ph_loop_filter_across_virtual_boundaries_disabled_present_flag) isnot present and is inferred to be 0.

In an example according to the present embodiment, when the SPS PHvirtual boundaries present flag(sps_ph_loop_filter_across_virtual_boundaries_disabled_present_flag) is1, the signaling information for disabling the loop filter across thevirtual boundaries may be included in the PH.

The following table shows an exemplary syntax of the SPS according tothe present embodiment.

TABLE 17 Descriptor seq_parameter_set_rbsp( ) { sps_decoding_parameter_set_id u(4)  ... sps_loop_filter_across_virtual_boundaries_disabled_present_flag u(1) if( sps_loop_filter_across_virtual_boundaries_disabled_present_flag ) {  sps_num_ver_virtual_boundaries u(2)   for( i = 0; i <sps_num_ver_virtual_boundaries; i++ )    sps_virtual_boundaries_pos_x[ i] u(13)   sps_num_hor_virtual_boundaries u(2)   for( i = 0; i <sps_num_hor_virtual_boundaries; i++ )    sps_virtual_boundaries_pos_y[ i] u(13)  } else  sps_ph_loop_filter_across_virtual_boundaries_disabled_present_flagu(1)  ... }

The following table shows an exemplary semantics of syntax elementsincluded in the syntax.

TABLE 18 sps_loop_filter_across_virtual_boundaries_disabled_present_flagequal to 1 specifies that virtual boundary locations for disablingin-loop filter operations are present in the SPS.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to0 specifies that virtual boundary locations for disabling in-loop filteroperations are not present in the SPS . In-loop filtering operationsinclude the deblocking filter, sample adaptive offset filter, andadaptive loop filter operations. sps_num_ver_virtual_boundariesspecifies the number of sps_virtual_boundaries_pos_x[ i ] syntaxelements that are present in the SPS. Whensps_num_ver_virtual_boundaries is not present, it is inferred to beequal to 0. sps_virtual_boundaries_pos_x[ i ] is used to compute thevalue of VirtualBoundariesPosX[ i ], which specifies the location of thei-th vertical virtual boundary in units of luma samples.sps_virtual_boundaries_pos_x[ i ] shall be in the range of 1 to Ceil(pic_width_in_luma_samples ÷ 8 ) − 1, inclusive.sps_num_hor_virtual_boundaries specifies the number ofsps_virtual_boundaries_pos_y[ i ] syntax elements that are present inthe SPS. When sps_num_hor_virtual_boundaries is not present, it isinferred to be equal to 0. Whensps_loop_filter_across_virtual_boundaries_disabled_present_flag is equalto 1, the sum of sps_num_ver_virtual_boundaries andsps_num_hor_virtual_boundaries shall be greater than 0.sps_virtual_boundaries_pos_y[ i ] is used to compute the value ofVirtualBoundariesPosY[ i ], which specifies the location of the i-thhorizontal virtual boundary in units of luma samples.sps_virtual_boundaries_pos_y[ i ] shall be in the range of 1 to Ceil(pic_height_in_luma_samples ÷ 8 ) − 1, inclusive.sps_ph_loop_filter_across_virtual_boundaries_disabled_present_flag equalto 1 specifies that virtual boundary locations for disabling in-loopfilter operations may be present in the picture header of picturesreferring to the SPS.sps_ph_loop_filter_across_virtual_boundaries_disabled_present_flag equalto 0 specifies that virtual boundary locations for disabling in-loopfilter operations are not present in picture header of picturesreferring to the SPS. In-loop filtering operations include thedeblocking filter, sample adaptive offset filter, and adaptive loopfilter operations. When not present,sps_ph_loop_filter_across_virtual_boundaries_disabled_present_flag isinferred to be equal to 0 When gdr_enabled_flag is equal to 1,sps_loop_filter_across_virtual_boundaries_disabled_present_flag isconstrained to be equal to 0 and andsps_ph_loop_filter_across_virtual_boundaries_disabled_present_flag isconstrained to be 1.

The following table shows an exemplary syntax of the header information(the picture header) according to the present embodiment.

TABLE 19 Descriptor picture_header_rbsp( ) {  non_reference_picture_flagu(1) ...  if(sps_ph_loop_filter_across_virtual_boundaries_disabled_present_flag) {  ph_loop_filter_across_virtual_boundaries_disabled_present_flag u(1)  if( ph_loop_filter_across_virtual_boundaries_disabled_present_flag ) {   ph_num_ver_virtual_boundaries u(2)    for( i = 0; i <ph_num_ver_virtual_boundaries; i++ )     ph_virtual_boundaries_pos_x[ i] u(13)    ph_num_hor_virtual_boundaries u(2)    for( i = 0; i <ph_num_hor_virtual_boundaries; i++ )     ph_virtual_boundaries_pos_y[ i] u(13)   }  } ... }

The following table shows an exemplary semantics of syntax elementsincluded in the syntax.

TABLE 20 ph_loop_filter_across_virtual_boundaries_disabled_present_flagequal to 1 specifies that the in-loop filtering operations are disabledacross the virtual boundaries in pictures associated to the PH.ph_loop_filter_across_virtual_boundaries_disabled_present_flag equal to0 specifies that no such disabling of in-loop filtering operations isapplied in pictures associated to the PH. The in-loop filteringoperations include the deblocking filter, sample adaptive offset filter,and adaptive loop filter operations. When not present, the value ofph_loop_filter_across_virtual_boundaries_disabled_present_flag isinferred to be equal to 0. The parameter VirtualBoundariesDisabledFlagis derived as follows:  VirtualBoundariesDisabledFlag = sps_loop_filter_across_virtual_boundaries_disabled_present_flag | |   sps_ph_loop_filter_across_virtual_boundaries_disabled_present_flag ||     ph_loop_filter_across_virtual_boundaries_disabled_present_flag(7-42) ph_num_ver_virtual_boundaries specifies the number ofph_virtual_boundaries_pos_x[ i ] syntax elements that are present in thePH. When ph_num_ver_virtual_boundaries is not present, it is inferred tobe equal to 0. . Whensps_loop_filter_across_virtual_boundaries_disabled_present_flag is equalto 1, ph_num_ver_virtual_boundaries is constraint to be greater than 0.The parameter VirtualBoundariesNumVer is derived as follows: VirtualBoundariesNumVer =sps_loop_filter_across_virtual_boundaries_disabled_present_flag ?  sps_num_ver_virtual_boundaries :  (sps_ph_loop_filter_across_virtual_boundaries_disabled present_flag ?  ph_num_ver_virtual_boundaries : 0) (7-43) ph_virtual_boundaries_pos_x[i ] is used to compute the value of VirtualBoundariesPosX[ i ], whichspecifies the location of the i-th vertical virtual boundary in units ofluma samples. ph_virtual_boundaries_pos_x[ i ] shall be in the range of1 to Ceil( pic_width_in_luma_samples ÷ 8) − 1, inclusive. The locationof the vertical virtual boundary VirtualBoundariesPosX[ i ] is derivedas follows:  VirtualBoundariesPosX[ i ] =(sps_loop_filter_across_virtual_boundaries_disabled_present_flag ?  sps_virtual_boundaries_pos_x[ i ] :  (sps_ph_loop_filter_across_virtual_boundaries_disabled_present_flag ?  ph_virtual_boundaries_pos_x[ i]) * 8 : 0) (7-44) The distance betweenany two vertical virtual boundaries shall be greater than or equal toCtbSizeY luma samples. ph_num_hor_virtual_boundaries specifies thenumber of ph_virtual_boundaries_pos_y[ i ] syntax elements that arepresent in the PH. When ph_num_hor_virtual_boundaries is not present, itis inferred to be equal to 0. Whenph_loop_filter_across_virtual_boundaries_disabled_present_flag is equalto 1, the sum of ph_num_ver_virtual_boundaries andph_num_hor_virtual_boundaries shall be greater than 0. The parameterVirtualBoundariesNumHor is derived as follows:  VirtualBoundariesNumHor= sps_loop_filter_across_virtual_boundaries_disabled_present_flag ?  sps_num_hor_virtual_boundaries :  (sps_ph_loop_filter_across_virtual_boundaries_disabled_present_flag ?  ph_num_hor_virtual_boundaries : 0) (7-45) ph_virtual_boundaries_pos_y[i ] is used to compute the value of VirtualBoundariesPosY[ i ], whichspecifies the location of the i-th horizontal virtual boundary in unitsof luma samples. ph_virtual_boundaries_pos_y[ i ] shall be in the rangeof 1 to Ceil( pic_height_in_luma_samples ÷ 8) − 1, inclusive. Thelocation of the horizontal virtual boundary VirtualBoundariesPosY[ i ]is derived as follows:  VirtualBoundariesPosY[ i ] =(sps_loop_filter_across_virtual_boundaries_disabled_present_flag ?  sps_virtual_boundaries_pos_y[ i ] :  (sps_ph_loop_filter_across_virtual_boundaries_disabled_present_ flag ?  ph_virtual_boundaries_pos_y[ i ]) * 8) : 0 ) (7-46) The distancebetween any two horizontal virtual boundaries shall be greater than orequal to CtbSizeY luma samples

In an embodiment related to Table 17 to Table 20, image informationobtained by the encoding apparatus and/or image information obtainedthrough a bitstream received from the encoding apparatus to the decodingapparatus may include a sequence parameter set (SPS) and a pictureheader (PH). The SPS may include an SPS virtual boundaries present flag(sps_loop_filter_across_virtual_boundaries_disabled_presentflag). Basedon the SPS virtual boundaries present flag, the SPS may includeinformation on the number of SPS vertical virtual boundaries(sps_num_ver_virtual_boundaries), information on an SPS vertical virtualboundary position (sps_virtual_boundaries_pos_x[i]), information on thenumber of SPS horizontal virtual boundaries(sps_num_hor_virtual_boundaries), and information on an SPS horizontalvirtual boundary position (sps_virtual_boundaries_pos_y[i]).

For example, when a value of the SPS virtual boundaries present flag is1, the SPS may include information on the number of SPS vertical virtualboundaries, information on the SPS vertical virtual boundary position,information on the number of SPS horizontal virtual boundaries, andinformation on the SPS horizontal virtual boundary position. In anexample, the number of pieces of information on the SPS vertical virtualboundaries position may be determined based on information on the SPSvertical virtual boundaries, and the number of pieces of information onthe SPS horizontal virtual boundaries position may be determined basedon the number of SPS horizontal virtual boundaries. The SPS may includethe SPS PH virtual boundaries present flag, based on the SPS virtualboundaries present flag.

For example, when a value of the SPS virtual boundaries present flag is0, the SPS may include an SPS PH virtual boundaries present flag. Thepicture header may include a PH virtual boundaries present flag, basedon the SPS PH virtual boundaries present flag. For example, when a valueof the SPS PH virtual boundaries present flag is 1, the picture headermay include the PH virtual boundaries present flag. Based on the PHvirtual boundaries present flag, the picture header may includeinformation on the number of PH vertical virtual boundaries(ph_num_ver_virtual_boundaries), information on a PH vertical virtualboundaries position (ph_virtual_boundaries_pos_x[i]), information on thenumber of PH horizontal virtual boundaries(ph_num_hor_virtual_boundaries), and information on a PH horizontalvirtual boundaries position (ph_virtual_boundaries_pos_y[i]).

For example, when a value of the PH virtual boundaries present flag is1, the picture header may include information on the number of PHvertical virtual boundaries, information on the PH vertical virtualboundaries position, information on the number of PH horizontal virtualboundaries, and information on the PH horizontal virtual boundariesposition. In an example, the number of pieces of information on the PHvertical virtual boundaries position may be determined based on theinformation on the number of the PH vertical virtual boundaries, and thenumber of pieces of information on the PH horizontal virtual boundariesposition may be determined based on the information on the number of thePH horizontal virtual boundaries.

In another embodiment of the present document, when gradual decodingrefresh (GDR) is available (i.e., a value of gdr_enabled_flag is 1), afeature in which loop filters are disabled at virtual boundaries isenabled, and virtual boundaries information may be signaled in a pictureheader (may be included in the picture header).

In another embodiment of the present document, when a function ofdisabling loop filters across virtual boundaries is enabled, informationon signaling of a position of the virtual boundaries may be included inone or more parameter sets. For example, when the function of disablingthe loop filters across the virtual boundaries is enabled, theinformation on the position of the virtual boundaries may be included inan SPS and a picture header.

In the present embodiment, when the SPS virtual boundaries enabled flag(sps_loop_filter_across_virtual_boundaries_disabled_flag) is 1 andsignalling information on a position of virtual boundaries is includedin one or more parameter sets, the followings may be applied.

-   -   a) Signalling information on the position of the virtual        boundaries may be included only in the SPS, or included only in        the picture header, or included both in the SPS and the picture        header.    -   b) VirtualBoundariesDisabledFlag for each picture may be derived        as follows.        -   When sps_loop_filter_across_virtual_boundaries_disabled_flag            is 0, VirtualBoundariesDisabledFlag may be set to 0.        -   In another case of the present example, when the information            on the position of the virtual boundaries is not signaled            both in an SPS and a picture header associated with a            picture, VirtualBoundariesDisabledFlag may be set to 0.        -   In other cases of the present example (when the position of            the virtual boundaries is signaled only in the SPS or only            in the picture header or both in the SPS and the picture            header), VirtualBoundariesDisabledFlag may be set to 1.    -   c) Virtual boundaries applied to the picture may include a union        of virtual boundaries signaled in a parameter set which is        directly or indirectly referred to by the picture. For example,        the virtual boundaries may include virtual boundaries (if        present) signaled in the SPS. For example, the virtual        boundaries may include virtual boundaries (if present) signaled        in the picture associated with the picture.    -   d) A constraint may be applied such that the maximum number of        virtual boundaries per picture does not exceed a pre-defined        value. For example, the pre-defined value may be 8.    -   e) It may be further constrained that information (if present)        on a position of a virtual boundary signaled in a picture header        shall not coincide with information on virtual boundary        positions included in another parameter set (e.g., SPS or PPS).        -   Alternatively, for any virtual boundary position applied to            the current picture, the virtual boundary position (e.g.,            the same virtual boundary position signaled in the SPS and            the picture header associated with the picture) may be            included in two different parameter sets.    -   f) It may be further constrained that, when the SPS virtual        boundaries present flag        (sps_loop_filter_across_virtual_boundaries_disabled_present_flag)        is 1, the SPS PH virtual boundaries present flag        (sps_ph_loop_filter_across_virtual_boundaries_disabled_present_flag)        is not present and is inferred to be 0.

The following table shows an exemplary syntax of the SPS according tothe present embodiment.

TABLE 21 Descriptor seq_parameter_set_rbsp( ) { sps_decoding_parameter_set id u(4)  ... sps_loop_filter_across_virtual_boundaries_disabled_flag u(1)  if(sps_loop_filter_across_virtual_boundaries_disabled_flag ) {  sps_loop_filter_across_virtual_boundaries_disabled_present_flag u(1)  if( sps_loop_filter_across_virtual_boundaries_disabled_present_flag ){    sps_num_ver_virtual_boundaries u(2)    for( i = 0; i <sps_num_ver_virtual_boundaries; i++ )     sps_virtual_boundaries_pos_x[i ] u(13)    sps_num_hor_virtual_boundaries u(2)    for( i = 0; i <sps_num_hor_virtual_boundaries; i++ )     sps_virtual_boundaries_pos_y[i ] u(13)   }  }  ... }

The following table shows an exemplary semantics of syntax elementsincluded in the syntax.

TABLE 22 sps_loop_filter_across_virtual_boundaries_disabled_flag equalto 1 specifies that the in-loop filtering operations are disabled acrossthe virtual boundaries in pictures referring to the SPS.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to0 specifies that no such disabling of in-loop filtering operations isapplied in pictures referring to the SPS. In-loop filtering operationsinclude the deblocking filter, sample adaptive offset filter, andadaptive loop filter operations.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to1 specifies that the syntax elements for the in-loop filteringoperations for the virtual boundaries is present in the SPS.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to0 specifies that the syntax elements for the virtual boundaries in-loopfiltering operations is not present in the SPS. In-loop filteringoperations include the deblocking filter, sample adaptive offset filter,and adaptive loop filter operations. When gdr_enabled_flag is equal to1, sps_loop_filter_across_virtual_boundaries_disabled_flag is constraintto be 1 andsps_loop_filter_across_virtual_boundaries_disabled_present_flag isconstraint to be 0. sps_num_ver_virtual_boundaries specifies the numberof sps_virtual_boundaries_pos_x[ i ] syntax elements that are present inthe SPS. When sps_num_ver_virtual_boundaries is not present, it isinferred to be equal to 0. sps_virtual_boundaries_pos_x[ i ] is used tocompute the value of VirtualBoundariesPosX[ i ], which specifies thelocation of the i-th vertical virtual boundary in units of luma samples.sps_virtual_boundaries_pos_x[ i ] shall be in the range of 1 to Ceil(pic_width_in_luma_samples ÷ 8 ) − 1, inclusive.sps_num_hor_virtual_boundaries specifies the number ofsps_virtual_boundaries_pos_y[ i ] syntax elements that are present inthe SPS. When sps_num_hor_virtual_boundaries is not present, it isinferred to be equal to 0. Whensps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1and sps_loop_filter_across_virtual_boundaries_disabled_present_flag isequal to 1, the sum of sps_num_ver_virtual_boundaries andsps_num_hor_virtual_boundaries shall be greater than 0.sps_virtual_boundaries_pos_y[ i ] is used to compute the value ofVirtualBoundariesPosY[ i ], which specifies the location of the i-thhorizontal virtual boundary in units of luma samples.sps_virtual_boundaries_pos_y[ i ] shall be in the range of 1 to Ceil(pic_height_in_luma_samples ÷ 8 ) − 1, inclusive.

The following table shows an exemplary syntax of the header information(the picture header) according to the present embodiment.

TABLE 23 Descriptor picture_header_rbsp( ) {  non_reference_picture_flagu(1)  ...  if( sps_loop_filter_across_virtual_boundaries_disabled_flag){   ph_loop_filter_across_virtual_boundaries_disabled_present_flag u(1)  if( ph_loop_filter_across_virtual_boundaries_disabled_present_flag ) {   ph_num_ver_virtual_boundaries u(2)    for( i = 0; i <ph_num_ver_virtual_boundaries; i++ )     ph_virtual_boundaries_pos_x[ i] u(13)    ph_num_hor_virtual_boundaries u(2)    for( i = 0; i <ph_num_hor_virtual_boundaries; i++ )     ph_virtual_boundaries_pos_y[ i]u(13)   }  }  ... }

The following table shows an exemplary semantics of syntax elementsincluded in the syntax.

TABLE 24 ph_loop_filter_across_virtual_boundaries_disabled_present_flagequal to 1 specifies that the in-loop filtering operations are disabledacross the virtual boundaries in pictures associated to the PH.ph_loop_filter_across_virtual_boundaries_disabled_(——)present_flag equalto 0 specifies that no such disabling of in-loop filtering operations isapplied in pictures associated to the PH. The in-loop filteringoperations include the deblocking filter, sample adaptive offset filter,and adaptive loop filter operations. When not present, the value ofph_loop_filter_across_virtual_boundaries_disabled_present_flag isinferred to be equal to 0. The parameter VirtualBoundariesDisabledFlagis derived as follows:  VirtualBoundariesDisabledFlag = 0  if(sps_loop_filter_across_virtual_boundaries_disabled_flag )  VirtualBoundariesDisabledFlag = sps_loop_filter_across_virtual_boundaries_disabled_present_flag    | |ph_loop_filter_across_virtual_boundaries_disabled_present_flagAlternatively, the following constraint may be specified: Whensps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1and sps_loop_filter_across_virtual_boundaries_disabled_present_flag isequal to 0,ph_loop_filter_across_virtual_boundaries_disabled_present_flag is equalto 1 ph_num_ver_virtual_boundaries specifies the number ofph_virtual_boundaries_pos_x[ i ] syntax elements that are present in thePH. When ph_num_ver_virtual_boundaries is not present, it is inferred tobe equal to 0. The parameter VirtualBoundariesNumVer is derived asfollows:  VirtualBoundariesNumVer = sps_num_ver_virtual_boundaries + ph_num_ver_virtual_boundaries (7-43) ph_num_hor_virtual_boundariesspecifies the number of ph_virtual_boundaries_pos_y[ i ] syntax elementsthat are present in the PH. When ph_num_hor_virtual_boundaries is notpresent, it is inferred to be equal to 0. The distance between any twovertical virtual boundaries shall be greater than or equal to CtbSizeYluma samples. ph_virtual_boundaries_pos_x[ i ] is used to compute thevalue of VirtualBoundariesPosX[ i ], which specifies the location of thei-th vertical virtual boundary in units of luma samples.ph_virtual_boundaries_pos_x[ i ] shall be in the range of 1 to Ceil(pic_width_in_luma_samples ÷ 8 ) − 1, inclusive. The listVirtualBoundariesPosX[ i ], for I ranges from 0 toVirtualBoundariesNumVer − 1, inclusive, is derived as follows:  for( i =0; i < VirtualBoundariesNumVer; i++) {   if(sps_loop_filter_across_virtual_boundaries_disabled_flag ) {   VirtualBoundariesPosX[ i ] = ( i < sps_num_ver_virtual_boundaries ) ?    sps_virtual_boundaries_pos_x[ i ] :     ph_virtual_boundaries_pos_x[i − sps_num_ver_virtual_boundaries ]    VirtualBoundariesPosX[ i ] *= 8  } else    VirtualBoundariesPosX[ i ] = 0  } The distance between anytwo vertical virtual boundaries shall be greater than or equal toCtbSizeY luma samples. ph_num_hor_virtual_boundaries specifics thenumber of ph_virtual_boundaries_pos_y[ i ] syntax elements that arepresent in the PH. When ph_num_hor_virtual_boundaries is not present, itis inferred to be equal to 0. The parameter VirtualBoundariesNumHor isderived as follows:  VirtualBoundariesNumHor =sps_num_hor_virtual_boundaries + ph_num_hor_virtual_boundaries  (7-45)ph_virtual_boundaries_pos_y[ i ] is used to compute the value ofVirtualBoundariesPosY[ i ], which specifies the location of the i-thhorizontal virtual boundary in units of luma samples.ph_virtual_boundaries_pos_y[ i ] shall be in the range of 1 to Ceil(pic_height_in_luma_samples ÷ 8) − 1, inclusive. The location of thehorizontal virtual boundary VirtualBoundariesPosY[ i ] is derived asfollows: The list VirtualBoundariesPosY[ i ], for i ranges from 0 toVirtualBoundariesNumHor − 1, inclusive, is derived as follows:  for( i =0; i < VirtualBoundariesNumHor; i++) {   if(sps_loop_filter_across_virtual_boundaries_disabled_flag ) {   VirtualBoundariesPosY[ i ] = ( i < sps_num_hor_virtual_boundaries ) ?    sps_virtual_boundaries_pos_y[ i ] :     ph_virtual_boundaries_pos_y[i − sps_num_hor_virtual_boundaries ]    VirtualBoundariesPosY[ i ] *= 8  } else    VirtualBoundariesPosY[ i ] = 0  } The distance between anytwo horizontal virtual boundaries shall be greater than or equal toCtbSizeY luma samples Whensps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1and ph_loop_filter_across_virtual_boundaries_disabled_present_flag isequal to 1, the sum of ph_num_ver_virtual_boundaries andph_num_hor_virtual_boundaries shall be greater than 0.

In an embodiment related to Table 21 to Table 24, image informationobtained by the encoding apparatus and/or image information obtainedthrough a bitstream received from the encoding apparatus to the decodingapparatus may include a sequence parameter set (SPS) and a pictureheader (PH). The SPS may include a virtual boundaries enabled flag(sps_loop_filter_across_virtual_boundaries_disabled_flag). The SPS mayinclude an SPS virtual boundaries present flag(sps_loop_filter_across_virtual_boundaries_disabled_present_flag), basedon the virtual boundaries enabled flag. For example, when a value of thevirtual boundaries enabled flag is 1, the SPS may include the SPSvirtual boundaries present flag. Based on the virtual boundaries enabledflag and the SPS virtual boundaries present flag, the SPS may includeinformation on the number of SPS vertical virtual boundaries(sps_num_ver_virtual_boundaries), information on an SPS vertical virtualboundaries position (sps_virtual_boundaries_pos_x[i]), information onthe number of SPS horizontal virtual boundaries(sps_num_hor_virtual_boundaries), and information on an SPS horizontalvirtual boundaries position (sps_virtual_boundaries_pos_y[i]).

For example, when a value of the virtual boundaries enabled flag is 1and a value of the SPS virtual boundaries present flag is 1, the SPS mayinclude information on the number of the SPS vertical virtualboundaries, information on the SPS vertical virtual boundaries position,information on the number of the SPS horizontal virtual boundaries, andinformation on the SPS horizontal virtual boundaries position. In anexample, the number of pieces of information on the SPS vertical virtualboundaries position may be determined based on the information on thenumber of the SPS vertical virtual boundaries, and the number of piecesof information on the SPS horizontal virtual boundaries position may bedetermined based on the information on the number of the SPS horizontalvirtual boundaries. The picture header may include a PH virtualboundaries present flag, based on the virtual boundaries enabled flag.

For example, when a value of the virtual boundaries enabled flag is 1,the picture header may include the PH virtual boundaries present flag.Based on the PH virtual boundaries present flag, the picture header mayinclude information on the number of PH vertical virtual boundaries(ph_num_ver_virtual_boundaries), information on a PH vertical virtualboundaries position (ph_virtual_boundaries_pos_x[i]), information on thenumber of PH horizontal virtual boundaries(ph_num_hor_virtual_boundaries), and information on a PH horizontalvirtual boundaries position (ph_virtual_boundaries_pos_y[i]). Forexample, when a value of the PH virtual boundaries present flag is 1,the picture header may include information on the number of PH verticalvirtual boundaries, information on the PH vertical virtual boundariesposition, information on the number of PH horizontal virtual boundaries,and information on the PH horizontal virtual boundaries position. In anexample, the number of pieces of information on the PH vertical virtualboundaries position may be determined based on the information on thenumber of the PH vertical virtual boundaries, and the number of piecesof information on the PH horizontal virtual boundaries position may bedetermined based on the information on the number of the PH horizontalvirtual boundaries.

In another embodiment of the present document, loop filtering may beperformed according to the aforementioned embodiments by not restrictingthat a sum of the number of vertical virtual boundaries and the numberof horizontal virtual boundaries is greater than 0.

In another embodiment of the present document, information on thevirtual boundary may be signaled in both the SPS and the PH. In anexample of the present embodiment, when a value of the SPS virtualboundaries enabled flag(sps_loop_filter_across_virtual_boundaries_disabled_flag) is 1,information on the number of vertical virtual boundaries, information onthe number of horizontal virtual boundaries, and/or information on avirtual boundaries position may be included in the SPS. In additionthereto, when the value of the SPS virtual boundaries enabled flag(sps_loop_filter_across_virtual_boundaries_disabled_flag) is 1,information on the number of vertical virtual boundaries, information onthe number of horizontal virtual boundaries, and/or information on avirtual boundaries position delta value (a delta value of a virtualboundaries position) may be included in the picture header. The deltavalue of the virtual boundaries position may refer to a differencebetween positions of virtual boundaries. Information on a sign of thevirtual boundaries position may also be included in the picture header.

According to an example of the present embodiment, in order to derivevirtual boundaries positions for respective pictures, if the delta valueof the virtual boundaries position is not present in the picture header,information on the virtual boundaries position, signaled in the SPS, maybe used for loop filtering. If the delta value of the virtual boundariesposition is present in the picture header, the virtual boundariesposition may be derived based on a sum of information on the virtualboundaries position, signaled in the SPS, and a delta value relatedthereto.

The following table shows an exemplary syntax of the SPS according tothe present embodiment.

TABLE 25 Descriptor seq_parameter_set_rbsp( ) { sps_decoding_parameter_set_id u(4)  ... sps_loop_filter_across_virtual_boundaries_disabled_flag u(1)  if(sps_loop_filter_across_virtual_boundaries_disabled_flag ) {  sps_num_ver_virtual_boundaries u(2)   for( i = 0; i <sps_num_ver_virtual_boundaries; i++ )    sps_virtual_boundaries_pos_x[ i] u(13)   sps_num_hor_virtual_boundaries u(2)   for( i = 0; i <sps_num_hor_virtual_boundaries; i++ )    sps_virtual_boundaries_pos_y[ i] u(13)  }  ... }

The following table shows an exemplary semantics of syntax elementsincluded in the syntax.

TABLE 26 sps_loop_filter_across_virtual_boundaries_disabled_flag equalto 1 specifies that the in-loop filtering operations are disabled acrossthe virtual boundaries in pictures referring to the SPS.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to0 specifies that no such disabling of in-loop filtering operations isapplied in pictures referring to the SPS. In-loop filtering operationsinclude the deblocking filter, sample adaptive offset filter, andadaptive loop filter operations.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to1 specifies that the syntax elements for the in-loop filteringoperations for the virtual boundaries is present in the SPS.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to0 specifies that the syntax elements for the virtual boundaries in-loopfiltering operations is not present in the SPS. In-loop filteringoperations include the deblocking filter, sample adaptive offset filter,and adaptive loop filter operations. When gdr_enabled_flag is equal to1, sps_loop_filter_across_virtual_boundaries_disabled_flag is constraintto be 1 andsps_loop_filter_across_virtual_boundaries_disabled_present_flag isconstraint to be 0. sps_num_ver_virtual_boundaries specifies the numberof sps_virtual_boundaries_pos_x[ i ] syntax elements that are present inthe SPS. When sps_num_ver_virtual_boundaries is not present, it isinferred to be equal to 0. sps_virtual_boundaries_pos_x[ i ] is used tocompute the value of VirtualBoundariesPosX[ i ], which specifies thelocation of the i-th vertical virtual boundary in units of luma samples.sps_virtual_boundaries_pos_x[ i ] shall be in the range of 1 to Ceil(pic_width_in_luma_samples ÷ 8 ) − 1, inclusive.sps_num_hor_virtual_boundaries specifies the number ofsps_virtual_boundaries_pos_y[ i ] syntax elements that are present inthe SPS. When sps_num_hor_virtual_boundaries is not present, it isinferred to be equal to 0. Whensps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1and sps_loop_filter_across_virtual_boundaries_disabled_present_flag isequal to 1, the sum of sps_num_ver_virtual_boundaries andsps_num_hor_virtual_boundaries shall be greater than 0.sps_virtual_boundaries_pos_y[ i ] is used to compute the value ofVirtualBoundariesPosY[ i ], which specifies the location of the i-thhorizontal virtual boundary in units of luma samples.sps_virtual_boundaries_pos_y[ i ] shall be in the range of 1 to Ceil(pic_height_in_luma_samples ÷ 8 ) − 1, inclusive.

The following table shows an exemplary syntax of the header information(the picture header) according to the present embodiment.

TABLE 27 Descriptor picture_header_rbsp( ) {  non_reference_picture_flagu(1)  ...  if( sps_loop_filter_across_virtual_boundaries_disabled_flag){   ph_loop_filter_across_virtual_boundaries_disabled_present_flag u(1)  if( ph_loop_filter_across_virtual_boundaries_disabled_present_flag ) {   for( i = 0; i < sps_num_ver_virtual_boundaries; i++ ) {    ph_virtual_boundaries_pos_x_delta[ i ] ue(v)     if(ph_virtual_boundaries_pos_x_delta[ i ] > 0 )     ph_virtual_boundaries_pos_x_sign[ i ] u(1)    }    for( i = 0; i <sps_num_hor_virtual_boundaries; i++ ) {    ph_virtual_boundaries_pos_y_delta[ i ] ue(v)     if(ph_virtual_boundaries_pos_y_delta[ i ] > 0 )     ph_virtual_boundaries_pos_y_sign[ i ] u(1)    }   }  }  ... }

The following table shows an exemplary semantics of syntax elementsincluded in the syntax.

TABLE 28 ph_loop_filter_across_virtual_boundaries_disabled_present_flagequal to 1 specifies that the in-loop filtering operations are disabledacross the virtual boundaries in pictures associated to the PH.ph_loop_filter_across_virtual_boundaries_disabled_present_flag equal to0 specifies that no such disabling of in-loop filtering operations isapplied in pictures associated to the PH. The in-loop filteringoperations include the deblocking filter, sample adaptive offset filter,and adaptive loop filter operations. When not present, the value ofph_loop_filter_across_virtual_boundaries_disabled_present_flag isinferred to be equal to 0. The parameter VirtualBoundariesDisabledFlagis derived as follows:   VirtualBoundariesDisabledFlag =(sps_num_ver_virtual_boundaries +       sps_num_hor_virtual_boundaries >0 ) ? 1 : 0 ph_virtual_boundaries_pos_x_delta[ i ] is used to computethe value of VirtualBoundariesPosX[ i ], which specifics the location ofthe i-th vertical virtual boundary in units of luma samples.ph_virtual_boundaries_pos x[ i ] shall be in the range of 1 to Ceil(pic_width_in_ luma_samples ÷ 8) − 1, inclusive.ph_virtual_boundaries_pos_x_sign[ i ] specifies the sign of the i-thvirtual boundary, which specifies the location of the i th verticalvirtual boundary in units of luma samples. When not present, the valueof ph_virtual_boundaries_pos_x_sign[ i ] is inferred to be equal to 0.The variable ph VirtualBoundariesPosX[ i ] for i ranges from 0 tosps_num_ver_virtual_boundaries − 1, inclusive, is initialized asfollows:  phVirtualBoundariesPosX[ i ] =ph_virtual_boundaries_pos_x_delta[ i ] *      ( 1 − 2 *ph_virtual_boundaries_pos_x_sign[ i ]). The location of the verticalvirtual boundary VirtualBoundariesPosX[ i ] is derived as follows:  VirtualBoundariesPosX[ i ] = 0   if(sps_loop_filter_across_virtual_boundaries_disabled_flag ) {    if(ph_loop_filter_across_virtual_boundaries_disabled_present_flag ) (7-44)    VirtualBoundariesPosX[ i ] = ( sps_virtual_boundaries_pos_x[ i ] +     phVirtualBoundariesPosX[ i ] ) * 8    else    VirtualBoundariesPosX[ i ] = ( sps_virtual_boundaries_pos_x[ i ] ) *8   } The distance between any two vertical virtual boundaries shall begreater than or equal to CtbSizeY luma samples.ph_num_hor_virtual_boundaries specifies the number ofph_virtual_boundaries_pos_y[ i ] syntax elements that are present in thePH. When ph_num_hor_virtual_boundaries is not present, it is inferred tobe equal to 0. ph_virtual_boundaries_pos_y_delta[ i ] is used to computethe value of VirtualBoundariesPosY[ i ], which specifies the location ofthe i-th horizontal virtual boundary in units of luma samples.ph_virtual_boundaries_pos_y[ i ] shall be in the range of 1 to Ceil(pic_height_in_luma_samples ÷ 8 ) − 1, inclusive. The location of thehorizontal virtual boundary VirtualBoundariesPosY[ i ] is derived asfollows: ph_virtual_boundaries_pos_y_sign [ i ] specifies the sign ofthe i-th virtual boundary, which specifies the location of the i thhorizontal virtual boundary in units of luma samples. When not present,the value of ph_virtual_boundaries_pos_y_sign[ i ] is inferred to beequal to 0. The variable phVirtualBoundariesPosY[ i ] for i ranges from0 to sps_num_hor_virtual_boundaries − 1, inclusive, is initialized asfollows:  phVirtualBoundariesPosY[ i ] =ph_virtual_boundaries_pos_y_delta[ i ] *      ( 1 − 2 *ph_virtual_boundaries_pos_y_sign [ i ])   VirtualBoundariesPosY[ i ] = 0  if( sps_loop_filter_across_virtual_boundaries_disabled_flag ) {    if(ph_loop_filter_across_virtual_boundaries_disabled_present_flag ) (7-46)    VirtualBoundariesPosY[ i ] = ( sps_virtual_boundaries_pos_y[ i ] +    phVirtualBoundariesPosY[ i] ) *8    else     VirtualBoundariesPosY[i ] = (sps_virtual_boundaries_pos_y[ i ] ) * 8   } The distance betweenany two horizontal virtual boundaries shall be greater than or equal toCtbSizeY luma samples Whensps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1and ph_loop_filter_across_virtual_boundaries_disabled_present_flag isequal to 1, the sum of ph_num_ver_virtual_boundaries andph_num_hor_virtual_boundaries shall be greater than 0. Whensps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1and ph_loop_filter_across_virtual_boundaries_disabled_present_flag isequal to 1, the sum of sps_num_ver_virtual_boundaries,sps_num_hor_virtual_boundaries, ph_num_ver_virtual_boundaries andph_num_hor_virtual_boundaries shall not be greater than 8.

In an embodiment related to Table 25 to Table 28, image informationobtained by the encoding apparatus and/or image information obtainedthrough a bitstream received from the encoding apparatus to the decodingapparatus may include a sequence parameter set (SPS) and a pictureheader (PH). The SPS may include a virtual boundaries enabled flag(sps_loop_filter_across_virtual_boundaries_disabled_flag). Based on thevirtual boundaries enabled flag, the SPS may include information on thenumber of SPS vertical virtual boundaries(sps_num_ver_virtual_boundaries), information on an SPS vertical virtualboundaries position (sps_virtual_boundaries_pos_x[i]), information onthe number of SPS horizontal virtual boundaries(sps_num_hor_virtual_boundaries), and information on an SPS horizontalvirtual boundaries position (sps_virtual_boundaries_pos_y[i]). Forexample, when a value of the virtual boundaries enabled flag is 1, theSPS may include information on the number of the SPS horizontal virtualboundaries, information on the SPS horizontal virtual boundariesposition, information on the number of the SPS vertical virtualboundaries, and information on the SPS vertical virtual boundariesposition.

In an example, the number of pieces of information on the SPS horizontalvirtual boundaries position may be determined based on the informationon the number of the SPS horizontal virtual boundaries, and the numberof pieces of information on the SPS vertical virtual boundaries positionmay be determined based on the information on the number of the SPSvertical virtual boundaries. The picture header may include a PH virtualboundaries present flag, based on the virtual boundaries enabled flag.For example, when a value of the virtual boundaries enabled flag is 1,the picture header may include the PH virtual boundaries present flag.Based on the PH virtual boundaries present flag, the picture header mayinclude information on a delta value of a PH horizontal virtualboundaries position (ph_virtual_boundaries_pos_x_delta[i]), informationon a sign of the PH horizontal virtual boundaries position(ph_virtual_boundaries_pos_x_sign[i]), information on a delta value of aPH vertical virtual boundaries position(ph_virtual_boundaries_pos_y_delta[i]), and information on a sign of thePH vertical virtual boundaries position(ph_virtual_boundaries_pos_y_sign[i]).

For example, when a value of the PH virtual boundaries present flag is1, the picture header may include information on the PH vertical virtualboundaries position delta value, information on a sign of the PHvertical virtual boundaries position, information on the PH horizontalvirtual boundaries position delta value, and information a sign of thePH horizontal virtual boundaries position. In an example, the number ofpieces of information on the PH vertical virtual boundaries positiondelta value and information on the number of pieces of information on asign of the PH vertical virtual boundaries position may be determinedbased on information on the number of SPS vertical virtual boundaries,and the number of pieces of information on the PH horizontal virtualboundaries position delta value and information on the number of piecesof information a sign of the PH horizontal virtual boundaries positionmay be determined based on information on the number of the SPShorizontal virtual boundaries.

In another embodiment of the present document, signaling of informationon a virtual boundaries position for each picture will be described. Inan example, when the information on the virtual boundaries position isincluded in the SPS and the information on the virtual boundariesposition delta value is not included in the picture header, informationon the virtual boundaries, included in the SPS, may be used for loopfiltering. When the information on the virtual boundaries position isnot included in the SPS and the information on the virtual boundariesposition delta value is included in the picture header, information onthe virtual boundaries, included in the picture header, may be used forloop filtering. When the information on the virtual boundaries positionis included in the SPS and the information on the virtual boundariesposition delta value is included in the picture header, the virtualboundaries position may be derived based on a sum of information on thevirtual boundaries position, signed in the SPS, and a delta valuerelated thereto. When the information on the virtual boundaries positionis not included in the SPS and the information on the virtual boundariesposition delta value is not included in the picture header, the virtualboundary may not be applied to the picture.

The following table shows an exemplary syntax of the SPS according tothe present embodiment.

TABLE 29 Descriptor seq_parameter_set_rbsp( ) { sps_decoding_parameter_set_id u(4)  ... sps_loop_filter_across_virtual_boundaries_disabled_flag u(1)  if(sps_loop_filter_across_virtual_boundaries_disabled_flag ) {  sps_loop_filter_across_virtual_boundaries_disabled_present_flag u(1)  if( sps_loop_filter_across_virtual_boundaries_disabled_present_flag ){    sps_num_ver_virtual_boundaries u(2)    for( i = 0; i <sps_num_ver_virtual_boundaries; i++ )     sps_virtual_boundaries_pos_x[i ] u(13)    sps_num_hor_virtual_boundaries u(2)    for( i = 0; i <sps_num_hor_virtual_boundaries; i++ )     sps_virtual_boundaries_pos_y[i ] u(13)   }  }  ... }

The following table shows an exemplary semantics of syntax elementsincluded in the syntax.

TABLE 30 sps_loop_filter_across_virtual_boundaries_disabled_flag equalto 1 specifies that the in-loop filtering operations are disabled acrossthe virtual boundaries in pictures referring to the SPS.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to0 specifies that no such disabling of in-loop filtering operations isapplied in pictures referring to the SPS. In-loop filtering operationsinclude the deblocking filter, sample adaptive offset filter, andadaptive loop filter operations.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to1 specifies that the syntax elements for the in-loop filteringoperations for the virtual boundaries is present in the SPS.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to0 specifies that the syntax elements for the virtual boundaries in-loopfiltering operations is not present in the SPS. In-loop filteringoperations include the deblocking filter, sample adaptive offset filter,and adaptive loop filter operations. When gdr_enabled_flag is equal to1, sps_loop_filter_across_virtual_boundaries_disabled_flag is constraintto be 1 andsps_loop_filter_across_virtual_boundaries_disabled_present_flag isconstraint to be 0. sps_num_ver_virtual_boundaries specifies the numberof sps_virtual_boundaries_pos_x[ i ] syntax elements that are present inthe SPS. When sps_num_ver_virtual_boundaries is not present, it isinferred to be equal to 0. sps_virtual_boundaries_pos_x[ i ] is used tocompute the value of VirtualBoundariesPosX[ i ], which specifies thelocation of the i-th vertical virtual boundary in units of luma samples.sps_virtual_boundaries_pos_x[ i ] shall be in the range of 1 to Ceil(pic_width_in_luma_samples ÷ 8 ) − 1, inclusive.sps_num_hor_virtual_boundaries specifies the number ofsps_virtual_boundaries_pos_y[ i ] syntax elements that are present inthe SPS. When sps_num_hor_virtual_boundaries is not present, it isinferred to be equal to 0. Whensps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1and sps_loop_filter_across_virtual_boundaries_disabled_present_flag isequal to 1, the sum of sps_num_ver_virtual_boundaries andsps_num_hor_virtual_boundaries shall be greater than 0.sps_virtual_boundaries_pos_y[ i ] is used to compute the value ofVirtualBoundariesPosY[ i ], which specifies the location of the i-thhorizontal virtual boundary in units of luma samples.sps_virtual_boundaries_pos_y[ i ] shall be in the range of 1 to Ceil(pic_height_in_luma_samples ÷ 8 ) − 1, inclusive.

The following table shows an exemplary syntax of the header information(the picture header) according to the present embodiment.

TABLE 31 Descriptor picture_header_rbsp( ) {  non_reference_picture_flagu(1)  ...  if( sps_loop_filter_across_virtual_boundaries_disabled_flag){   ph_loop_filter_across_virtual_boundaries_disabled_present_flag u(1)  if( ph_loop_filter_across_virtual_boundaries_disabled_present_flag ) {   if( !sps_num_ver_virtual_boundaries )    ph_num_ver_virtual_boundaries u(2)    for( i = 0; i <ph_num_ver_virtual_boundaries; i++ ) {    ph_virtual_boundaries_pos_x_delta[ i ] ue(v)     if(ph_virtual_boundaries_pos_x_delta[ i ] > 0 )     ph_virtual_boundaries_pos_x_sign[ i ] u(1)    }    if(!sps_num_hor_virtual_boundaries )     ph_num_hor_virtual_boundaries u(2)   for( i = 0; i < ph_num_hor_virtual_boundaries; i++ ) {    ph_virtual_boundaries_pos_y_delta[ i ] ue(v)     if(ph_virtual_boundaries_pos_y_delta[ i ] > 0 )     ph_virtual_boundaries_pos_y_sign[ i ] u(1)    }   }  }  ... }

The following table shows an exemplary semantics of syntax elementsincluded in the syntax.

TABLE 32 ph_loop_filter_across_virtual_boundaries_disabled_present_flagequal to 1 specifies that the in-loop filtering operations are disabledacross the virtual boundaries in pictures associated to the PH.ph_loop_filter_across_virtual_boundaries_disabled_present_flag equal to0 specifies that no such disabling of in-loop filtering operations isapplied in pictures associated to the PH. The in-loop filteringoperations include the deblocking filter, sample adaptive offset filter,and adaptive loop filter operations. When not present, the value ofph_loop_filter_across virtual_boundaries_disabled_present_flag isinferred to be equal to 0. The parameter VirtualBoundariesDisabledFlagis derived as follows:   VirtualBoundariesDisabledFlag = 0   if(sps_loop_filter_across_virtual_boundaries_disabled_flag )   VirtualBoundariesDisabledFlag =  sps_loop_filter_across_virtual_boundaries_disabled_present_flag     || ph_loop_filter_across_virtual_boundaries_disabled_present_flagAlternatively, the following constraint may be specified: Whensps_loop_filter_across virtual_boundaries_disabled_flag is equal to 1and sps_loop_filter_across_virtual_boundaries_disabled_present_flag isequal to 0,ph_loop_filter_across_virtual_boundaries_disabled_present_flag is equalto 1 ph_num_ver_virtual_boundaries specifies the number ofph_virtual_boundaries_pos_x_delta[ i ] syntax elements that are presentin the PH. When ph_num_ver_virtual_boundaries is not present, it isinferred to be equal to sps_num_ver_virtual_boundaries.ph_num_hor_virtual_boundaries specifies the number ofph_virtual_boundaries_pos_y_delta[ i ] syntax elements that are presentin the PH. When ph_num_hor_virtual_boundaries is not present, it isinferred to be equal to sps_num_hor_virtual_boundaries.ph_virtual_boundaries_pos_x_delta[ i ] is used to compute the value ofVirtualBoundariesPosX[ i ], which specifies the location of the i-thvertical virtual boundary in units of luma samples.ph_virtual_boundaries_pos_x[ i ] shall be in the range of 1 to Ceil(pic_width_in_luma_samples ÷ 8) − 1, inclusive.ph_virtual_boundaries_pos_x_sign [ i ] specifies the sign of the i-thvirtual boundary, which specifies the location of the i th verticalvirtual boundary in units of luma samples. When not present, the valueof ph_virtual_boundaries_pos_x_sign[ i ] is inferred to be equal to 0.The variable phVirtualBoundariesPosX[ i ] for i ranges from 0 tosps_num_ver_virtual_boundaries − 1, inclusive, is initialized asfollows:  phVirtualBoundariesPosX[ i ] =ph_virtual_boundaries_pos_x_delta[ i ] *        ( 1 − 2 *ph_virtual_boundarics_pos_x_sign[ i ]) The location of the verticalvirtual boundary VirtualBoundariesPosX[ i ] is derived as follows:  VirtualBoundariesPosX[ i ] = 0   if(sps_loop_filter_across_virtual_boundaries_disabled_flag ) {    if(sps_loop_filter_across_virtual_boundaries_disabled_present_flag ) {    if( ph_loop_filter_across_virtual_boundaries_disabled_present_flag )(7-44)       VirtualBoundariesPosX[ i ] = (sps_virtual_boundaries_pos_x[ i ] +         phVirtualBoundariesPosC[ i ]) * 8     else      VirtualBoundariesPosX[ i ] = (sps_virtual_boundarics_pos_x[i] ) * 8    } else if(ph_loop_filter_across_virtual_boundaries_disabled present_flag)    VirtualBoundariesPosX[ i ] = phVirtualBoundariesPosX[ i ] * 8   }The distance between any two vertical virtual boundaries shall begreater than or equal to CtbSizeY luma samples.ph_num_hor_virtual_boundaries specifies the number ofph_virtual_boundaries_pos_y[ i ] syntax clements that are present in thePH. When ph_num_hor_virtual_boundaries is not present, it is inferred tobe equal to 0. ph_virtual_boundaries_pos_y_delta[ i ] is used to computethe value of VirtualBoundariesPosY[ i ], which specifies the location ofthe i-th horizontal virtual boundary in units of luma samples.ph_virtual_boundaries_pos_y[ i ] shall be in the range of 1 to Ceil(pic_height_in_luma_samples ÷ 8) − 1. inclusive. The location of thehorizontal virtual boundary VirtualBoundariesPosY[ i ] is derived asfollows; ph_virtual_boundaries_pos_y_sign [ i ] specifies the sign ofthe i-th virtual boundary, which specifies the location of the i thhorizontal virtual boundary in units of luma samples. When not present,the value of ph_virtual_boundaries_pos_y_sign[ i ] is inferred to beequal to 0. The variable phVirtualBoundariesPosY[ i ] for i ranges from0 to sps_num_hor_virtual_boundaries − 1, inclusive, is initialized asfollows:  phVirtualBoundariesPosY[ i ] =ph_virtual_boundaries_pos_y_delta[ i ]*        ( 1 − 2 *ph_virtual_boundaries_pos_y_sign[ i ])   VirtualBoundariesPosY[ i ] =0  if( sps_loop_filter_across_virtual_boundaries_disabled_flag )    if(sps_loop_filter_across_virtual_boundaries_disabled_present_flag )    if( ph_loop_filter_across_virtual_boundaries_disabled_present_flag )(7-46)       VirtualBoundariesPosY[ i ] = (sps_virtual_boundaries_pos_y[ i ] +         phVirtualBoundariesPosY[ i ]) * 8     else      VirtualBoundariesPosY[ i ] = (sps_virtual_boundaries_pos_y[ i ] ) * 8    else if(ph_loop_filter_across_virtual_boundaries_disabled_present_flag)    VirtualBoundariesPosY[ i ] = phVirtualBoundariesPosY[ i ] ) * 8   }The distance between any two horizontal virtual boundaries shall begreater than or equal to CtbSizeY luma samples Whensps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1and ph_loop_filter_across virtual_boundaries_disabled present_ flag isequal to 1, the sum of ph_num_ver_virtual_boundaries and ph_num_horvirtual boundaries shall be greater than 0. Whensps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1and ph_loop_filter_across_virtual_boundaries_disabled_present_flag isequal to 1, the sum of sps_num_ver_virtual boundaries, sps_numhor_virtual boundaries, ph_num_ver_virtual boundaries andph_num_hor_virtual_boundaries shall not be greater than 8.

In an embodiment related to Table 29 to Table 32, image informationobtained by the encoding apparatus and/or image information obtainedthrough a bitstream received from the encoding apparatus to the decodingapparatus may include a sequence parameter set (SPS) and a pictureheader (PH).

The SPS may include a virtual boundaries enabled flag(sps_loop_filter_across_virtual_boundaries_disabled_flag). The SPS mayinclude an SPS virtual boundaries present flag(sps_loop_filter_across_virtual_boundaries_disabled_present_flag), basedon the virtual boundaries enabled flag. For example, when a value of thevirtual boundaries enabled flag is 1, the SPS may include the SPSvirtual boundaries present flag. Based on the virtual boundaries enabledflag and the SPS virtual boundaries present flag, the SPS may includeinformation on the number of SPS vertical virtual boundaries(sps_num_ver_virtual_boundaries), information on an SPS vertical virtualboundaries position (sps_virtual_boundaries_pos_x[i]), information onthe number of SPS horizontal virtual boundaries(sps_num_hor_virtual_boundaries), and information on an SPS horizontalvirtual boundaries position (sps_virtual_boundaries_pos_y[i]).

For example, when a value of the virtual boundaries enabled flag is 1and a value of the SPS virtual boundaries present flag is 1, the SPS mayinclude information on the number of the horizontal virtual boundaries,information on the horizontal virtual boundaries position, informationon the number of the vertical virtual boundaries, and information on thevertical virtual boundaries position. In an example, the number ofpieces of information on the horizontal virtual boundaries position maybe determined based on the information on the number of the horizontalvirtual boundaries, and the number of pieces of information on thevertical virtual boundaries position may be determined based on theinformation on the number of the vertical virtual boundaries. Thepicture header may include a PH virtual boundaries present flag, basedon the virtual boundaries enabled flag.

For example, when a value of the virtual boundaries enabled flag is 1,the picture header may include the PH virtual boundaries present flag.The picture header may include information on the number of PH verticalvirtual boundaries (ph_num_ver_virtual_boundaries), based on the PHvirtual boundaries present flag and information on the number of the SPSvertical virtual boundaries. For example, when a value of the PH virtualboundaries present flag is 1 and a value of the information on thenumber of the SPS vertical virtual boundaries is 0, the picture headermay include information on the number of the PH vertical virtualboundaries. In an example, based on information on the number of the PHvertical virtual boundaries, the picture header may include informationon a delta value of a PH vertical virtual boundaries position(ph_virtual_boundaries_pos_x_delta[i]) and information on a sign of thePH vertical virtual boundaries position(ph_virtual_boundaries_pos_x_sign[i]). In an example, based on theinformation on the number of the PH vertical virtual boundaries, thenumber of pieces of information on the PH vertical virtual boundariesposition delta value and the number of pieces of information on a signof the PH vertical virtual boundaries position may be determined. Thepicture header may include information on the number of PH horizontalvirtual boundaries (ph_num_hor_virtual_boundaries), based on the PHvirtual boundaries present flag and information on the number of the SPShorizontal virtual boundaries.

For example, when a value of the PH virtual boundaries present flag is 1and a value of the information on the number of the SPS horizontalvirtual boundaries is 0, the picture header may include information onthe number of the PH horizontal virtual boundaries. In an example, basedon information on the number of the PH horizontal virtual boundaries,the picture header may include information on a delta value of a PHhorizontal virtual boundaries position(ph_virtual_boundaries_pos_y_delta[i]) and information on a sign of thePH horizontal virtual boundaries position(ph_virtual_boundaries_pos_y_sign[i]). In an example, based on theinformation on the number of the PH horizontal virtual boundaries, thenumber of pieces of information on the PH horizontal virtual boundariesposition delta value and the number of pieces of information on a signof the PH horizontal virtual boundaries position may be determined.

According to embodiments of the present document together with thetables above, information for performing in-loop filtering acrossvirtual boundaries may be effectively signaled. For example, the in-loopfiltering may be performed based on signaling of information related towhether the in-loop filtering is enabled across the virtual boundaries.

FIG. 7 and FIG. 8 schematically show an example of a video/imageencoding method and related components according to embodiment(s) of thepresent document.

The method disclosed in FIG. 7 may be performed by the encodingapparatus disclosed in FIG. 2 or FIG. 8 . Specifically, for example,S700 and S710 of FIG. 7 may be performed by a residual processor 230 ofthe encoding apparatus of FIG. 8 , S720 of FIG. 7 may be performed by afilter 260 of the encoding apparatus of FIG. 8 , and S730 of FIG. 7 maybe performed by an entropy encoder 240 of the encoding apparatus of FIG.8 . In addition, although not shown in FIG. 7 , prediction samples orprediction-related information may be derived by a predictor 220 of theencoding apparatus of FIG. 7 , and a bitstream may be generated fromresidual information or prediction-related information by the entropyencoder 240 of the encoding apparatus. The method disclosed in FIG. 7may include the aforementioned embodiments in the present document.

Referring to FIG. 7 , the encoding apparatus may derive residual samples(S700). The encoding apparatus may derive residual samples for a currentblock, and the residual samples for the current block may be derivedbased on original samples and prediction samples of the current block.Specifically, the encoding apparatus may derive the prediction samplesof the current blocks, based on a prediction mode. In this case, variousprediction methods disclosed in the present document, such as interprediction or intra prediction, may be applied. The residual samples maybe derived based on the prediction samples and the original samples.

The encoding apparatus may derive transform coefficients. The encodingapparatus may derive the transform coefficients, based on a transformprocess for the residual samples. For example, the transform process mayinclude at least one of a discrete cosine transform (DCT), a discretesine transform (DST), a graph-based transform (GBT), and a conditionallynon-linear transform (CNT).

The encoding apparatus may derive quantized transform coefficients. Theencoding apparatus may derive the quantized transform coefficients,based on a quantization process for the transform coefficients. Thequantized transform coefficients may have a 1-dimensional vector form,based on a coefficient scan order.

The encoding apparatus may generate residual information (S710). Theencoding apparatus may generate the residual information, based on thetransform coefficients. The encoding apparatus may generate residualinformation indicating the quantized transform coefficients. Theresidual information may be generated through various encoding methodssuch as exponential Golomb, CAVLC, CABAC, or the like.

The encoding apparatus may generate reconstructed samples. The encodingapparatus may generate the reconstructed samples, based on the residualinformation. The reconstructed samples may be generated by adding theprediction sample and the residual samples based on the residualinformation. Specifically, the encoding apparatus may perform prediction(intra or inter prediction) on the current block, and may generatereconstructed samples, based on original samples and the predictionsamples generated from the prediction.

The reconstructed samples may include reconstructed luma samples andreconstructed chroma samples. Specifically, the residual samples mayinclude residual luma samples and residual chroma samples. The residualluma samples may be generated based on original luma samples andprediction luma samples. The residual chroma samples may be generatedbased on the original chroma samples and the prediction chroma samples.The encoding apparatus may derive transform coefficients for theresidual luma samples (luma transform coefficients) and/or transformcoefficients for the residual chroma samples (chroma transformcoefficients). Quantized transform coefficients may include quantizedluma transform coefficients and/or quantized chroma transformcoefficients.

The encoding apparatus may generate information related to in-loopfiltering for the reconstructed samples (S720). The encoding apparatusmay perform an in-loop filtering process on the reconstructed samples,and may generate information related to the in-loop filtering, based onthe in-loop filtering process. For example, the information related tothe in-loop filtering may include the aforementioned information onvirtual boundaries (the SPS virtual boundaries enabled flag, the pictureheader virtual boundaries enabled flag, the SPS virtual boundariespresent flag, the picture header virtual boundaries present flag,information on positions of virtual boundaries, etc.).

The encoding apparatus may encode video/image information (S730). Theimage information may include residual information, prediction-relatedinformation, and/or in-loop filtering-related information. The encodedvideo/image information may be output in the form of a bitstream. Thebitstream may be transmitted to a decoding apparatus through a networkor a storage medium.

The image/video information may include a variety of informationaccording to an embodiment of the present document. For example, theimage/video may include information disclosed in at least one of thetables 1 to 32 above.

In an embodiment, the in-loop filtering-related information may includean SPS virtual boundaries enabled flag related to whether an in-loopfiltering process is performed across virtual boundaries. For example,whether signaling of the information related to the virtual boundariesis present in an SPS or picture header information may be determinedbased on the SPS virtual boundaries enabled flag. The SPS virtualboundaries enabled flag may indicate whether it is possible to disablethe in-loop filtering process across the virtual boundaries.

In an embodiment, the image information may include a sequence parameterset (SPS). The SPS may include the SPS virtual boundaries enabled flagand an SPS virtual boundaries present flag. In addition, whetherinformation on positions of the virtual boundaries and information onthe number of the virtual boundaries are included in the SPS may bedetermined based on the SPS virtual boundaries present flag.

In an embodiment, the SPS may include information on the number ofvertical virtual boundaries, based on that a value of the SPS virtualboundaries present flag is 1.

In an embodiment, the SPS may include information on positions of thevertical virtual boundaries. In addition, the number of pieces of theinformation on positions of the vertical virtual boundaries may bedetermined based on the information on the number of vertical virtualboundaries.

In an embodiment, the SPS may include information on the number ofhorizontal virtual boundaries, based on that a value of the SPS virtualboundaries present flag is 1.

In an embodiment, the SPS may include information on positions of thehorizontal virtual boundaries. In addition, the number of pieces of theinformation on positions of the horizontal virtual boundaries may bedetermined based on the information on the number of horizontal virtualboundaries.

In an embodiment, the image information includes picture headerinformation. In addition, the picture header information may include apicture header virtual boundaries present flag, based on that a value ofthe SPS virtual boundaries enabled flag is 1 and a value of the SPSvirtual boundaries present flag is 0.

In an embodiment, the picture header information may include informationon the number of vertical virtual boundaries, based on that a value ofthe picture header virtual boundaries present flag is 1.

In an embodiment, the picture header information may include informationon positions of the vertical virtual boundaries. In addition, the numberof pieces of the information on positions of the vertical virtualboundaries may be determined based on the information on the number ofvertical virtual boundaries.

In an embodiment, the picture header information may include informationon the number of horizontal virtual boundaries, based on that a value ofthe picture header virtual boundaries present flag is 1.

In an embodiment, the picture header information may include informationon positions of the horizontal virtual boundaries. In addition, thenumber of pieces of the information on positions of the horizontalvirtual boundaries may be determined based on the information on thenumber of horizontal virtual boundaries.

In an embodiment, a sum of the number of vertical virtual boundaries andthe number of horizontal virtual boundaries may be greater than 0, basedon that the SPS includes information on positions of the verticalvirtual boundaries and information on positions of the horizontalvirtual boundaries.

In an embodiment, the information related to in-loop filtering (and/orinformation related to virtual boundaries) may further include an SPSvirtual boundaries present flag, a picture header virtual boundariespresent flag, and a gradual decoding refresh (GDR) enabled flag. Forexample, based on that a value of the GDR enabled flag is 1, a value ofthe SPS virtual boundaries enabled flag (the virtual boundaries enabledflag) may be 1, a value of the SPS virtual boundaries present flag maybe 0, and a value of the picture header virtual boundaries present flagmay be 1 (signaling of information of the virtual boundaries may bepresent in the picture header).

FIG. 9 and FIG. 10 schematically show an example of a video/imagedecoding method and related components according to embodiment(s) of thepresent document.

The method disclosed in FIG. 9 may be performed by the decodingapparatus disclosed in FIG. 3 or FIG. 10 . Specifically, for example,S900 of FIG. 9 may be performed by an entropy decoder 310 of thedecoding apparatus, S910 may be performed by a residual processor 320and/or adder 340 of the decoding apparatus, and S920 may be performed bya filter 350 of the decoding apparatus. The method disclosed in FIG. 9may include the aforementioned embodiments in the present document.

Referring to FIG. 9 , the decoding apparatus may receive/obtain thevideo/image information (S900). The video/image information may includeresidual information, prediction-related information, and/or in-loopfiltering-related information. The decoding apparatus may receive/obtainthe image/video information through a bitstream.

The image/video information may include a variety of informationaccording to an embodiment of the present document. For example, theimage/video may include information disclosed in at least one of thetables 1 to 32 above.

The decoding apparatus may derive quantized transform coefficients. Thedecoding apparatus may derive the quantized transform coefficients,based on the residual information. The quantized transform coefficientsmay have a 1-dimensional vector form, based on a coefficient scan order.Quantized transform coefficients may include quantized luma transformcoefficients and/or quantized chroma transform coefficients.

The decoding apparatus may derive the transform coefficients. Thedecoding apparatus may derive the transform coefficients, based on adequantization process for the quantized transform coefficients. Thedecoding apparatus may derive luma transform coefficients throughdequantization, based on the quantized luma transform coefficients. Thedecoding apparatus may derive chroma transform coefficients throughdequantization, based on the quantized chroma transform coefficients.

The decoding apparatus may generate/derive residual samples. Thedecoding apparatus may derive the residual samples, based on theinverse-transform process for the transform coefficients. The decodingapparatus may derive residual luma samples through the inverse-transformprocess, based on the luma transform coefficients. The decodingapparatus may derive residual chroma samples through theinverse-transform, based on the chroma transform coefficients.

The decoding apparatus may generate/derive reconstructed samples (S910).For example, the decoding apparatus may generate/derive reconstructedluma samples and/or reconstructed chroma samples. The decoding apparatusmay generate the reconstructed luma samples and/or the reconstructedchroma samples, based on the residual information. The decodingapparatus may generate reconstructed samples, based on the residualinformation. The reconstructed samples may include the reconstructedluma samples and/or the reconstructed chroma samples. A luma componentof the reconstructed samples may correspond to the reconstructed lumasamples, and a chroma component of the reconstructed samples maycorrespond to the reconstructed chroma samples. The decoding apparatusmay generate prediction luma samples and/or prediction chroma samplesthrough a prediction process. The decoding apparatus may generate thereconstructed luma samples, based on the prediction luma samples and theresidual luma samples. The decoding apparatus may generate thereconstruction chroma samples, based on the prediction chroma samplesand the residual chroma samples.

The decoding apparatus may generate modified (filtered) reconstructedsamples (S920). The decoding apparatus may generate the modifiedreconstructed samples by performing an in-loop filtering process for thereconstructed samples of the current picture. The decoding apparatus maygenerate the modified reconstructed samples, based on in-loopfiltering-related information (and/or virtual boundaries-relatedinformation). The decoding apparatus may use a deblocking process, anSAO process, and/or an ALF process to generate the modifiedreconstructed samples.

In an embodiment, the image information may include an SPS. The SPS mayinclude an SPS virtual boundaries enabled flag. In addition, the in-loopfiltering process may be performed across virtual boundaries, based onthe SPS virtual boundaries enable flag (or may not be performed acrossthe virtual boundaries). For example, whether signaling of theinformation related to the virtual boundaries is present in the SPS orpicture header information may be determined based on the SPS virtualboundaries enabled flag. The SPS virtual boundaries enabled flag mayindicate whether it is possible to disable the in-loop filtering processacross the virtual boundaries.

In an embodiment, the SPS may further include an SPS virtual boundariespresent flag. Whether information on positions of the virtual boundariesand information on the number of the virtual boundaries are included inthe SPS may be determined based on the SPS virtual boundaries presentflag.

In an embodiment, the SPS may include information on the number ofvertical virtual boundaries, based on that a value of the SPS virtualboundaries present flag is 1.

In an embodiment, the SPS may include information on positions of thevertical virtual boundaries. In addition, the number of pieces of theinformation on positions of the vertical virtual boundaries may bedetermined based on the information on the number of vertical virtualboundaries.

In an embodiment, the SPS may include information on the number ofhorizontal virtual boundaries, based on that a value of the SPS virtualboundaries present flag is 1.

In an embodiment, the SPS may include information on positions of thehorizontal virtual boundaries. In addition, the number of pieces of theinformation on positions of the horizontal virtual boundaries may bedetermined based on the information on the number of horizontal virtualboundaries.

In an embodiment, the image information includes picture headerinformation. In addition, the picture header information may include apicture header virtual boundaries present flag, based on that a value ofthe SPS virtual boundaries enabled flag is 1 and a value of the SPSvirtual boundaries present flag is 0.

In an embodiment, the picture header information may include informationon the number of vertical virtual boundaries, based on that a value ofthe picture header virtual boundaries present flag is 1.

In an embodiment, the picture header information may include informationon positions of the vertical virtual boundaries. In addition, the numberof pieces of the information on positions of the vertical virtualboundaries may be determined based on the information on the number ofvertical virtual boundaries.

In an embodiment, the picture header information may include informationon the number of horizontal virtual boundaries, based on that a value ofthe picture header virtual boundaries present flag is 1.

In an embodiment, the picture header information may include informationon positions of the horizontal virtual boundaries. In addition, thenumber of pieces of the information on positions of the horizontalvirtual boundaries may be determined based on the information on thenumber of horizontal virtual boundaries.

In an embodiment, a sum of the number of vertical virtual boundaries andthe number of horizontal virtual boundaries may be greater than 0, basedon that the SPS includes information on positions of the verticalvirtual boundaries and information on positions of the horizontalvirtual boundaries.

In an embodiment, the information related to in-loop filtering (and/orinformation related to virtual boundaries) may further include an SPSvirtual boundaries present flag, a picture header virtual boundariespresent flag, and a gradual decoding refresh (GDR) enabled flag. Forexample, based on that a value of the GDR enabled flag is 1, a value ofthe SPS virtual boundaries enabled flag (the virtual boundaries enabledflag) may be 1, a value of the SPS virtual boundaries present flag maybe 0, and a value of the picture header virtual boundaries present flagmay be 1 (signaling of information of the virtual boundaries may bepresent in the picture header).

In the presence of the residual sample for the current block, thedecoding apparatus may receive residual information for a current block.The residual information may include a transform coefficient forresidual samples. The decoding apparatus may derive residual samples (ora residual sample array) for the current block, based on the residualinformation. Specifically, the decoding apparatus may derive quantizedtransform coefficients, based on the residual information. The quantizedtransform coefficients may have a 1-dimensional vector form, based on acoefficient scan order. The decoding apparatus may derive the transformcoefficients, based on a dequantization process for the quantizedtransform coefficients. The decoding apparatus may derive residualsamples, based on the transform coefficients.

The decoding apparatus may generate reconstructed samples, based on(intra) prediction samples and residual samples, and may derive areconstructed block or reconstructed picture, based on the reconstructedsamples. Specifically, the decoding apparatus may generate reconstructedsamples, based on a sum between the (intra) prediction samples and theresidual samples. Thereafter, as described above, the decoding apparatusmay optionally apply the in-loop filtering process such as thedeblocking filtering and/or the SAO process to the reconstructed pictureto improve subjective/objective image quality.

For example, the decoding apparatus may obtain image informationincluding all or parts of the above-described pieces of information (orsyntax elements) by decoding the bitstream or the encoded information.Further, the bitstream or the encoded information may be stored in acomputer readable storage medium, and may cause the above-describeddecoding method to be performed.

Although methods have been described on the basis of a flowchart inwhich steps or blocks are listed in sequence in the above-describedembodiments, the steps of the present document are not limited to acertain order, and a certain step may be performed in a different stepor in a different order or concurrently with respect to that describedabove. Further, it will be understood by those ordinary skilled in theart that the steps of the flowcharts are not exclusive, and another stepmay be included therein or one or more steps in the flowchart may bedeleted without exerting an influence on the scope of the presentdisclosure.

The aforementioned method according to the present disclosure may be inthe form of software, and the encoding apparatus and/or decodingapparatus according to the present disclosure may be included in adevice for performing image processing, for example, a TV, a computer, asmart phone, a set-top box, a display device, or the like.

When the embodiments of the present disclosure are implemented bysoftware, the aforementioned method may be implemented by a module(process or function) which performs the aforementioned function. Themodule may be stored in a memory and executed by a processor. The memorymay be installed inside or outside the processor and may be connected tothe processor via various well-known means. The processor may includeApplication-Specific Integrated Circuit (ASIC), other chipsets, alogical circuit, and/or a data processing device. The memory may includea Read-Only Memory (ROM), a Random Access Memory (RAM), a flash memory,a memory card, a storage medium, and/or other storage device. In otherwords, the embodiments according to the present disclosure may beimplemented and executed on a processor, a micro-processor, acontroller, or a chip. For example, functional units illustrated in therespective figures may be implemented and executed on a computer, aprocessor, a microprocessor, a controller, or a chip. In this case,information on implementation (for example, information on instructions)or algorithms may be stored in a digital storage medium.

In addition, the decoding apparatus and the encoding apparatus to whichthe embodiment(s) of the present document is applied may be included ina multimedia broadcasting transceiver, a mobile communication terminal,a home cinema video device, a digital cinema video device, asurveillance camera, a video chat device, and a real time communicationdevice such as video communication, a mobile streaming device, a storagemedium, a camcorder, a video on demand (VoD) service provider, an OverThe Top (OTT) video device, an internet streaming service provider, a 3Dvideo device, a Virtual Reality (VR) device, an Augment Reality (AR)device, an image telephone video device, a vehicle terminal (forexample, a vehicle (including an autonomous vehicle) terminal, anairplane terminal, or a ship terminal), and a medical video device; andmay be used to process an image signal or data. For example, the OTTvideo device may include a game console, a Bluray player, anInternet-connected TV, a home theater system, a smartphone, a tablet PC,and a Digital Video Recorder (DVR).

In addition, the processing method to which the embodiment(s) of thepresent document is applied may be produced in the form of a programexecuted by a computer and may be stored in a computer-readablerecording medium. Multimedia data having a data structure according tothe embodiment(s) of the present document may also be stored in thecomputer-readable recording medium. The computer readable recordingmedium includes all kinds of storage devices and distributed storagedevices in which computer readable data is stored. The computer-readablerecording medium may include, for example, a Bluray disc (BD), auniversal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, aCD-ROM, a magnetic tape, a floppy disk, and an optical data storagedevice. The computer-readable recording medium also includes mediaembodied in the form of a carrier wave (for example, transmission overthe Internet). In addition, a bitstream generated by the encoding methodmay be stored in the computer-readable recording medium or transmittedthrough a wired or wireless communication network.

In addition, the embodiment(s) of the present document may be embodiedas a computer program product based on a program code, and the programcode may be executed on a computer according to the embodiment(s) of thepresent document. The program code may be stored on a computer-readablecarrier.

FIG. 11 represents an example of a contents streaming system to whichthe embodiment of the present document may be applied.

Referring to FIG. 11 , the content streaming system to which theembodiments of the present document is applied may generally include anencoding server, a streaming server, a web server, a media storage, auser device, and a multimedia input device.

The encoding server functions to compress to digital data the contentsinput from the multimedia input devices, such as the smart phone, thecamera, the camcorder and the like, to generate a bitstream, and totransmit it to the streaming server. As another example, in a case wherethe multimedia input device, such as, the smart phone, the camera, thecamcorder or the like, directly generates a bitstream, the encodingserver may be omitted.

The bitstream may be generated by an encoding method or a bitstreamgeneration method to which the embodiments of the present document isapplied. And the streaming server may temporarily store the bitstream ina process of transmitting or receiving the bitstream.

The streaming server transmits multimedia data to the user equipment onthe basis of a user's request through the web server, which functions asan instrument that informs a user of what service there is. When theuser requests a service which the user wants, the web server transfersthe request to the streaming server, and the streaming server transmitsmultimedia data to the user. In this regard, the contents streamingsystem may include a separate control server, and in this case, thecontrol server functions to control commands/responses betweenrespective equipment in the content streaming system.

The streaming server may receive contents from the media storage and/orthe encoding server. For example, in a case the contents are receivedfrom the encoding server, the contents may be received in real time. Inthis case, the streaming server may store the bitstream for apredetermined period of time to provide the streaming service smoothly.

For example, the user equipment may include a mobile phone, a smartphone, a laptop computer, a digital broadcasting terminal, a personaldigital assistant (PDA), a portable multimedia player (PMP), anavigation, a slate PC, a tablet PC, an ultrabook, a wearable device(e.g., a watch-type terminal (smart watch), a glass-type terminal (smartglass), a head mounted display (HMD)), a digital TV, a desktop computer,a digital signage or the like.

Each of servers in the contents streaming system may be operated as adistributed server, and in this case, data received by each server maybe processed in distributed manner.

Claims in the present description can be combined in a various way. Forexample, technical features in method claims of the present descriptioncan be combined to be implemented or performed in an apparatus, andtechnical features in apparatus claims can be combined to be implementedor performed in a method. Further, technical features in method claim(s)and apparatus claim(s) can be combined to be implemented or performed inan apparatus. Further, technical features in method claim(s) andapparatus claim(s) can be combined to be implemented or performed in amethod.

1-25. (canceled)
 26. An image decoding method performed by a decodingapparatus, comprising: obtaining image information including residualinformation through a bitstream; generating residual samples of acurrent block based on the residual information; generatingreconstructed samples of a current picture, based on the residualsamples of the current block; and generating modified reconstructedsamples, based on an in-loop filtering process for the reconstructedsamples, wherein the image information includes a sequence parameter set(SPS) and picture header information, wherein the SPS includes an SPSvirtual boundaries enabled flag, wherein the SPS further includes an SPSvirtual boundaries present flag based on a value of the SPS virtualboundaries enabled flag, wherein whether the in-loop filtering processis performed across the virtual boundaries is determined, based on theSPS virtual boundaries enabled flag, wherein whether information onpositions of the virtual boundaries and information on a number of thevirtual boundaries are included in the SPS is determined based on avalue of the SPS virtual boundaries present flag, wherein based on thatthe value of the SPS virtual boundaries enabled flag is 1 and the valueof the SPS virtual boundaries present flag is 0, the picture headerinformation includes a picture header virtual boundaries present flag,wherein whether information on positions of the virtual boundaries andinformation on a number of the virtual boundaries are included in thepicture header information is determined based on a value of the pictureheader virtual boundaries present flag, and wherein the information onthe number of the virtual boundaries includes information on a number ofvertical virtual boundaries and information on a number of horizontalvirtual boundaries.
 27. An image encoding method performed by anencoding apparatus, comprising: generating residual samples of a currentblock; generating residual information, based on the residual samples ofthe current block; generating in-loop filtering-related information forreconstructed samples of a current picture; and encoding imageinformation including the residual information and the in-loopfiltering-related information, wherein the image information includes asequence parameter set (SPS) and picture header information, wherein theSPS includes an SPS virtual boundaries enabled flag, wherein the SPSfurther includes an SPS virtual boundaries present flag based on a valueof the SPS virtual boundaries enabled flag, wherein the in-loopfiltering-related information includes the SPS virtual boundariesenabled flag related to whether an in-loop filtering process isperformed across virtual boundaries, wherein whether information onpositions of the virtual boundaries and information on a number of thevirtual boundaries are included in the SPS is determined based on avalue of the SPS virtual boundaries present flag, wherein based on thatthe value of the SPS virtual boundaries enabled flag is 1 and the valueof the SPS virtual boundaries present flag is 0, the picture headerinformation includes a picture header virtual boundaries present flag,wherein whether information on positions of the virtual boundaries andinformation on a number of the virtual boundaries are included in thepicture header information is determined based on a value of the pictureheader virtual boundaries present flag, and wherein the information onthe number of the virtual boundaries includes information on a number ofvertical virtual boundaries and information on a number of horizontalvirtual boundaries.
 28. A transmission method of data for an image, themethod comprising: obtaining a bitstream for the image, wherein thebitstream is generated based on generating residual samples of a currentblock, generating residual information, based on the residual samples ofthe current block, generating in-loop filtering-related information forreconstructed samples of a current picture, and encoding imageinformation including the residual information and the in-loopfiltering-related information; and transmitting the data comprising thebitstream, wherein the image information includes a sequence parameterset (SPS) and picture header information, wherein the SPS includes anSPS virtual boundaries enabled flag, wherein the SPS further includes anSPS virtual boundaries present flag based on a value of the SPS virtualboundaries enabled flag, wherein the in-loop filtering-relatedinformation includes the SPS virtual boundaries enabled flag related towhether an in-loop filtering process is performed across virtualboundaries, wherein whether information on positions of the virtualboundaries and information on a number of the virtual boundaries areincluded in the SPS is determined based on a value of the SPS virtualboundaries present flag, wherein based on that the value of the SPSvirtual boundaries enabled flag is 1 and the value of the SPS virtualboundaries present flag is 0, the picture header information includes apicture header virtual boundaries present flag, wherein whetherinformation on positions of the virtual boundaries and information on anumber of the virtual boundaries are included in the picture headerinformation is determined based on a value of the picture header virtualboundaries present flag, and wherein the information on the number ofthe virtual boundaries includes information on a number of verticalvirtual boundaries and information on a number of horizontal virtualboundaries.